A complete guide to mailto links in emails

A complete guide to mailto links in emails

Mailto links are hyperlinks which let you automatically open the default email client with a predefined recipient already typed in. Not everyone knows that in addition to the recipient, you can also define the subject, email body and cc fields of the new message. This lets you create contact links which make it easier to communicate with you. In this article, I’ll show you why it’s worth using mailto links in the first place, how you can use them and what their syntax is.

Complete guide to mailto link

Examples of use

The vital part of using mailto links is understanding what exactly you can do with them. After all, you might as well link to a form on your website instead of using mailto links. Well, in addition to many people preferring to use emails instead of online forms, the examples below show some scenarios in which mailto links will prove useful.

Predefined support requests

If you work in customer support, you know how important it is to collect as much information as possible. Unfortunately, customers don’t always know which piece of information will be helpful in resolving their issue. This may result in unnecessary back-and-forth when a problem could have been solved right away. With the right mailto link, you can help your clients provide all the data you need. Simply add some questions to the email body created using a mailto link and most people will be happy to tell you all you need to know.

Quotation requests

Similarly to support requests, in order to provide a customer with a quotation, you usually need some specific information. Depending on your pricing policy, you may need details like the number of users, the exact product or service your lead requires and more. A predefined subject line and email body should do the trick in this case as well.

Icebreakers

Sometimes, before someone actually contacts you, they may spend quite some time thinking if it’s better to use formal or informal style, what to open with or how to sign off. You can configure your mailto link to provide others with a short template which will make it easier for them to contact you. Such templates are especially handy for those recipients who read your emails on mobile devices as it helps them save even more time when writing emails.

Additional elements

Mailto links can be used to set the subject line or the email body. This opens an opportunity to add some non-standard elements like promo codes (to let your customers benefit from discounts or learn more about your special offers).

How do mailto links work

Mailto links behave a differently in email clients and in web browsers.

If someone clicks a mailto link on a website, it will open the user’s default mail app. That’s when you find out that even though you’ve been using Outlook or Thunderbird for as long as you remember, your default email client is still the Windows 10 Mail app.

On the other hand, if you click a mailto link in your email client (which also includes, for example, the browser-based Gmail and Yahoo clients), then no matter which client is set as default in App Settings, a new message window should open in the email client you are currently using. The same applies to most mobile clients.

Mailto link syntax

Mailto links have the following format in HTML code:

<a href="mailto:{email address}?subject={subject}&cc={cc addresses}&bcc={bcc addresses}&body={body}">{clickable text or image}</a>

Where:

  • {email address} defines the address which goes into the to/recipient field.
  • {subject} is the text that will go to the subject line.
  • {cc addresses} is a comma separated list of emails which will be entered in the CC field.
  • {bcc addresses} specifies the BCC addresses of the new email. Those email addresses won’t be visible to the email’s recipients.
  • {body} defines the pre-configured body of the email.
  • {clickable text or image} is the element which is displayed to the user and hyperlinked.

So, the following mailto link:

mailto:j.doe@example.com?cc=m.bowen@example.com&subject=Quick%20question&body=Hi%20team%21%0aHow%20are%20you%20doing%3F

will create this new message:

sample new mailto message 1

And if you want to add this link to the “contact us” text, the HTML code will be as follows:

<a href="mailto:j.doe@example.com?cc=m.bowen@example.com&subject=Quick%20question&body=Hi%20team%22%0aHow%20are%20you%20doing%3F">Contact us</a>

All parameters (the part following the question mark) are optional. Like with any other URL attributes, you can change their order freely. However, make sure that {email address} is first, a question mark follows it directly and each attribute is separated with an ampersand (&).

Another thing to keep in mind is that you can’t just use any character in the mailto link. Like with any URL, special characters need to be correctly coded. For example, if you want to add a question mark to your email body, you will need to replace it with %3F. All spaces should be replaced with %20 (although in most cases spaces are converted automatically). W3schools has a good guide on URL encoding if you need to look up the code for a certain special character.

Mailto link body

The body attribute in mailto links is the one which usually holds the most information and is the trickiest to get right due to the encoding mentioned earlier. While you can create pretty long URLs to include all the information you need in messages sent to you, be careful. The longer your link becomes, the more spammy it looks. What’s more, if you plan to add a big mailto link to your Gmail signature, you run the risk of getting the dreaded “signature too long” error. Using link shorteners is not a good idea either. Since they are often used by scammers, your message may be flagged as suspicious by spam filters.

How to add a mailto link

Adding the mailto link to your email in an email client is easy. Usually, all you need to do is highlight the element which you plan to make clickable and use the add hyperlink button. You can also use the Ctrl+K key combination, which works in most email clients.

When you add a mailto link to a banner, button or text, it is a good idea to give the user a hint that clicking it will create a new message. This way, your recipients won’t be surprised when they see a new message window opening.

Create your professional email signature

If you want to create your new email signature and add a mailto link to a banner, you can use the free email signature generator.

Pick the signature template you like most and fill in all the personal and company data. When you get to the Graphics section use the Banner URL field to add your banner and use your mailto link in the Banner linking to field:

signature generator mailto links

This way, when you deploy the signature in your email client and someone clicks your banner, it can, for example, create a new message like the one below:

sample new mailto message 2

You might also be interested in:

11 thoughts on “A complete guide to mailto links in emails

  1. Telkom University

    What are the advantages and disadvantages of using mailto links compared to other methods of initiating emails?

    Reply
    1. Kamil Glaser Post author

      To answer all the questions: Mailto links make it easier to initiate an email – you simply need to click a link, and your default mail app will take it from there.
      The advantage – you can add a predefined subject to make contact with you quicker and (unless someone changes the subject) know where the email comes from. It’s especially useful on mobiles.

      Reply
  2. Graham Hammond

    Hi. I want to use the mailto feature but I want it to launch an email template which I would normally navigate to in Outlook like this – New Item > More Items > Choose Form > User Templates in File System > myTemplate. Is it possible to get this template to launch with the mailto, rather than a blank email?

    Reply
    1. Tomek Stempniewicz

      Hi Graham,
      Unfortunately, the mailto links support only those parameters: mailto:, &cc=, &bcc=, &subject= and &body=. The most you can do here, is set the body of the message in &body=. And if you want to use mailto links for yourself, like canned responses, then perhaps Outlook Quick Parts would be a better solution.

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *