For a small project, I had to create a smart mailto link to make my life a bit easier. I wanted the mailto link to hold not only a to and the subject (I’d figured that much out) but a multi-lined body too. Turns out that is pretty darn easy to do. So, for my own reference, and yours, here’s a complete overview of everything possible with a mailto link.
There are a couple of variables you can use, which you’d have to do in standard URL format, remember to properly encode the & if you care about the validity of your HTML, so you use & in that case. Here’s the full mailto link syntax:
As you can see, you can add as many of these as you want and stack them on top of each other. Remember that after the email address you’ll use a question mark to prefix the first variable, and ampersands ( & ) for each consecutive variable.
April 30 - May 01, 2026
Team Yoast is Attending, Speaking, Sponsoring at brighton SEO - April 2026! Click through to see who will be there, what we will do, and more!
See where you can find us next
Stay tuned
Sorry! We don't have a webinar or podcast planned at the moment.
Keep an eye on our site and social media to stay up-to-date.
Discussion (29)