Let’s talk about mailto links in emails. We’re not exactly head-over-heels in love with them, but hey, sometimes they’re our only option. Sure, we’d prefer to craft stunning landing pages and interactive web forms, but let’s face it—life isn’t always that glamorous. Not everyone has the fancy tools, abundant resources, or luxury of time to create those masterpieces. That’s when our trusty sidekick, the mailto link, swoops in to save the day! And hey, there are moments when all we need is a lone humble email link nestled snugly in a contact us bar. So, in this post, let’s learn how to create and customize mailto links.
Step One: Create a Mailto Link
I often get questions about adding mailto links in emails, so let’s have a look. Many email service providers will actually have email mailto functionality in their WYSIWYG, making it super easy for the user. However, if you need to add it in manually, you will need to add a bit of HTML code. Here’s how:
|Please reply <a href=”mailto:insertemailaddress”>here</a>|
The method outlined above will insert the mailto link in the word “here“.
Step 2: Add a Subject Line into the Mailto Link
Let’s go a step further. If you are using mailto links, try to give your email recipients a better user-experience by pre-populating the subject line in the mailto link. Here’s the bit of extra code you need to add into the link:
|Please reply <a href=”mailto:insertemailaddress?subject=This is my subject line”>here</a>|
Please note that you might need to add %20 instead of spaces in the subject line.
|Please reply <a href=”mailto:insertemailaddress?subject=This%20is%20my%20subject%20line”>here</a>|
Step 3: Add Pre-Populated Body Text into the Mailto Email
It is also possible to add a bit of pre-populated body text in the mailto email message. Let’s say, you are creating an email message for a mailto link to capture registration confirmations. Thus, you’d like once the mailto email message to say, for example, “Yes, I would like to attend”. This way, your email recipient would just have to hit send. You can achieve that by adding &body to your HTML code:
|Please reply <a href=”mailto:insertemailaddress?subject=This%20is%20my%20subject%20line&body=Yes%20I%20will%20attend”>here</a>|
You might need to insert a line break in the body copy. You can do this by adding %0D%0A to your HTML code. Make sure you use correct HTML for the ampersand, question mark, equal signs, and double-quotes.
Bonus: Free HTML Editors
If you don’t have a tool to edit your HTML and you’re stuck with Notepad, try to use a free HTML editor. Here are some links to online HTML editors:
Originally published in March 2017, updated in January 2023