Glossary Term

Mailto Link

glossary mailto link featured

A mailto link is a hyperlink that opens the visitor’s email app with a new message already addressed to a set recipient. It uses the mailto: scheme instead of https:, so clicking it starts an email rather than loading a web page. Websites use mailto links for “Email us” buttons, support contacts, and prefilled feedback requests.

How a Mailto Link Works

A mailto link hands the click to the device’s default email client. The browser reads the mailto: URI scheme, finds the app registered to handle email (Apple Mail, Outlook, Gmail in the browser), and opens a draft. Nothing is sent until the visitor presses Send.

The scheme is defined in RFC 6068, published by the IETF in October 2010, which replaced the older RFC 2368. RFC 6068 says the mail client should show the user the message and ask for approval before sending. A mailto link can prefill an email, but it can never send one on its own.

If the visitor has no email app set up, the click does nothing or opens a setup prompt. This is the most common reason a mailto link “doesn’t work”.

Mailto Link HTML Syntax

A basic mailto link in HTML is an anchor tag with mailto: and an address in the href:

<a href="mailto:hello@example.com">hello@example.com</a>

The mailto URL can carry extra fields after a ?, joined with &:

  • subject: the subject line
  • cc and bcc: copy recipients
  • body: the message text
  • Multiple recipients: separate addresses with commas

A full example with every field:

<a href="mailto:sales@example.com,support@example.com?cc=manager@example.com&subject=Pricing%20question&body=Hi%2C%0D%0AI%20have%20a%20question%20about%20plans.">Email sales</a>

Encoding Rules for Mailto URLs

Mailto URLs must be percent-encoded, or the subject and body break. RFC 6068 sets three rules that catch most errors:

  1. Spaces become %20, not +. A + in the body stays a literal plus sign in many clients.
  2. Line breaks become %0D%0A. A raw line break ends the link.
  3. # becomes %23, & becomes %26, ? becomes %3F. Unencoded, they cut the field short or start a new one.

For example, a subject of “Q&A session” must be written subject=Q%26A%20session. Without encoding, the client reads the subject as “Q” and treats “A session” as a broken extra field.

Mailto Link vs Email Link

“Email link” means two different things, and mixing them up causes tracking mistakes.

  • Mailto link: a link on a web page or document that opens a new email. It starts with mailto:.
  • Link inside an email: a normal https:// link in a newsletter or campaign that opens a web page. It can carry UTM parameters and shows up in GA4.

A mailto link cannot carry UTM parameters in any useful way, because no web page loads when it is clicked. To count mailto clicks, track them as an event on the page that holds the link. In Google Tag Manager, a click trigger where Click URL starts with mailto: does this.

Common Mailto Link Issues

  • Spam harvesting. RFC 6068 warns that mailto links on public pages expose addresses to scrapers. This includes bcc addresses, which stay visible in the page source.
  • Hidden address. Link text like “Contact us” hides the address from visitors who have no email app. Show the address as the link text, or next to it, so it can be copied.
  • No attachments. RFC 6068 defines no attachment field. Some clients accept unofficial parameters, but most ignore them.
  • Overlong bodies. Long prefilled bodies make the URL fragile across clients. Keep the body to a sentence or two.

The same mailto: string also works offline. Encoding it in a code with an email QR code generator lets people scan a poster or business card and get a prefilled draft.

Frequently Asked Questions

What is a mailto link?

A mailto link is a link that opens a new email draft addressed to a specific recipient. It uses the mailto: scheme followed by an email address, such as mailto:hello@example.com. Clicking it launches the device’s default email app instead of a web page.

How do I create a mailto link in HTML?

Write an anchor tag with href="mailto: followed by the address: <a href="mailto:hello@example.com">hello@example.com</a>. Add ?subject= to prefill a subject line and &body= for the message text. Encode spaces as %20 so the fields display correctly.

Can a mailto link send an email automatically?

No, a mailto link cannot send an email automatically. It only opens a prefilled draft in the visitor’s email app. RFC 6068 says the client should ask the user to approve the message before it is sent.

Why is my mailto link not working?

A mailto link usually fails because the device has no default email app set. On a computer without a configured mail client, the click opens nothing or a setup screen. Broken links can also come from unencoded spaces, & characters, or line breaks in the subject or body.

Is a mailto link safe to put on a website?

A mailto link is safe for visitors, but it exposes the address to spam bots that scan page source. Many sites use a contact form or address obfuscation instead. Content delivery networks such as Cloudflare offer email obfuscation that hides addresses from scrapers while keeping links clickable.

To put a prefilled email on print, encode your mailto URL with linkutm’s free email QR code generator.