You are currently viewing The Best Way to Create a Email Link with Subject in HTML
  • Post category:HTML

The Best Way to Create a Email Link with Subject in HTML

Mailto HTML With Subject

In this article, we will discuss how we can create a mailto link with the subject in HTML. For ex, you have created a website for your company and your company is a service-based company. If you want to get feedback about services provided by the company from the users or visitors directly to your email ID then you need to create a link to your email ID on the website. So, that user can send feedback regarding services directly to your email ID or they can query by sending a mail directly to your email ID.

How to create an email link

<a href="mailto:mass4546@gmail.com?cc=manju@gmail.com">Send Feedback</a>

Steps:

  1. In the above code, we have created the <a> anchor tag.
  2. We use the “href” attribute and give the value as “mailto:” then we written the mailID. Once you click on the “send feedback” link, the defaul messaging that is installed will get open.
  3. The user acts like maybe he would write a subject and users message back to me. Once the users click on the send button the mail will be sent directly to “mass4536” mail ID.
  4. If you want to give more mail IDs also by giving commas. Ex : mailto:mass4546@gmail.com, john2320@gmail.com.
  5. If you want to give “CC” (carbon copies) to some other mail ID’s, you need to put “?cc=”. Ex: “mailto:mass4546@gmail.com?cc=manju@gmail.com”
  6. If you want to give add a subject, you need to put “&subject=”. Ex: “mailto:mass4546@gmail.com?subject=Type your feedback

Leave a Reply