Creating mailto: links that actually work

Max Clayton Clowes
2 min readDec 13, 2018

mailto: provides a way of creating hyperlinks in websites that will tell your computer to open the default mail client and create a new email without the user having to copy and paste the email address. You can even pre-fill the message subject and content.

A simple mailto: hyperlink looks something like this:

<a href="mailto:example@email.com">Email me</a>

You can read the full RFC documentation here: https://tools.ietf.org/html/rfc2368

Pretty useful. And it seems simple at first. But differing implementations across email clients can make it a deceptively difficult to create a mailto: link that works everywhere.

You might have a link opening fine in Mail on a Mac, only to realise that the links no longer work for Outlook on a PC. And then you turn to Stack Overflow where you decide you should probably be using semi-colons, not commas, but no one can really agree. Then you promptly just give up.

Even the Wikipedia page for mailto: gives instructions that won’t work by default on Outlook (which requires its users to actively turn on commas separation of email addresses).

Getting it right

Here is an example of a complex, robust, href link:

mailto:example@email.co…

--

--

Max Clayton Clowes

Product Manager with diverse software engineering and design background, and experience as a founder of a client-facing business