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:firstname.lastname@example.orgemail@example.com">Send Feedback</a>
- In the above code, we have created the <a> anchor tag.
- 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.
- 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.
- If you want to give more mail IDs also by giving commas. Ex : mailto:firstname.lastname@example.org, email@example.com.
- If you want to give “CC” (carbon copies) to some other mail ID’s, you need to put “?cc=”. Ex: “mailto:firstname.lastname@example.orgemail@example.com”
- If you want to give add a subject, you need to put “&subject=”. Ex: “mailto:firstname.lastname@example.org?subject=Type your feedback“