Add a Link to Your Email

To add a link to your email, also knowns as a mailto link, just add a mailto: value at the beginning of the href attribute in your anchor link.

<a href="mailto:name@example.com">Email Me</a>

You can customize what subject you want for the email.

<a href="mailto:name@example.com?subject=Hello World">Email Me</a>

You can also customize what body you want for the email.

<a href="mailto:name@example.com?body=I just dropped in to say hello!">Email Me</a>

You can also combine both customizations for the email, like so.

<a href="mailto:name@example.com?subject=Hello World&body=I just dropped in to say hello!">Email Me</a>
A screenshot of what happens when you click on a link to your Email with a Subject and a Body
A screenshot of your default email client when you click on a mailto link

Finally, when you click on the link, it will take you to your default email client or software, like so.

Post a Comment

To post code, use the code tag with a class language-*
Examples: code class="language-markup"code class="language-css"