EMAIL GLOSSARY

What Does Mailto Mean in Front of an Email Address?

Mailto is a HTML link which upon being clicked, will open the default email client on the user’s computer to create a new message. For example, if your default email client was Apple Mail, clicking on a Mailto link on a website would open Mail and a new message to the Mailto address.

To create a mailto link, you should use the anchor (<a>) HTML element tag and fill the href attribute as follow:

<a href="mailto:[email protected]">Contact us</a>

Use our mailto link generator to generate the href link value with your own parameters.

Most websites feature email addresses or contact forms to allow visitors to get in touch easily. Whilst email is one of the most ubiquitous forms of online communication - copying and pasting an email address into your email client can be plain annoying and inefficient. This is where “mailto” links come in handy.

You’ve likely seen email addresses formatted like this on websites:

But what does that “mailto:” bit actually mean? And how does it work to streamline email communications for both website visitors and developers?

Let’s cover everything you need to know about mailto links.

A mailto link allows users to automatically open a new email message by clicking a hyperlink on a webpage. This saves the hassle of manually copying and pasting email addresses into an email client.

Mailto links use the standard HTML anchor tag syntax, with a special mailto: prefix added to the href attribute:

<a href="mailto:[email protected]">Email Us</a>

When clicked, this engages the user’s default email client and prefills the recipient’s email address into the “To:” field of a new email.

A Brief History of the Mailto Protocol

The mailto protocol dates all the way back to the early 1990s. It was first introduced in 1992 as part of the MIME (Multipurpose Internet Mail Extensions) standard published in RFC 1341.

At the time, the initial mailto specification allowed hyperlinks to prefill only the recipient’s email address when clicked. But this still provided a handy way for early websites to enable email communications.

The protocol evolved in 1998 with RFC 2368, which expanded mailto to support prefilling the subject line, CC, BCC, and body fields too. This made mailto an even more useful convention for streamlining web-based email interactions.

Today, mailto remains a simple yet effective tool for initiating email messages from links on websites. Modern email clients intelligently recognize and handle mailto links.

Mailto links offer a straightforward way to launch new email messages with prefilled recipient and message details:

HTML Syntax

As outlined above, mailto links simply use a standard HTML anchor tag with a mailto: the prefix added to the href value:

<a href="mailto:[email protected]">Email Us</a>

This signals to the browser that the link should open the user’s email client rather than navigate to a web URL.

Triggering the Default Email Client

When clicked, a mailto link engages the user’s default email client. This could be:

  • A desktop app like Outlook or Apple Mail
  • A webmail service like Gmail or Yahoo Mail
  • The native email app on their smartphone

The exact behavior depends on the user’s device, browser, and settings.

Prefilling Message Details

Typically, clicking a mailto link will automatically open a new email composition window in the user’s default client. The recipient’s email address will be prefilled in the “To:” field.

The link can also be configured to prefill the subject line and body content, as covered later.

This saves the user from manually entering details each time they want to contact you.

There are several potential benefits to using mailto links on your website:

Convenience

Mailto links provide a seamless way for visitors to initiate contact via email. They eliminate the need to manually locate and copy your address into a new message.

This helps provide a smooth, frictionless experience for users who want to reach out to you.

Prefilled Details

By prefilling the subject line and body content, you can provide the user with useful context upfront about the reason for the message.

This sets clear expectations about the communication.

Accessibility

Mailto links are simple to implement and do not require specialized coding skills. They work universally across all modern email clients and browsers.

This makes it easy to enable email links anywhere they may be useful.

Click Tracking

With server-side programming, mailto links can integrate with analytics to track clicks and engagement. This provides insight into how well the links perform.

Promotional Tool

Strategically placed mailto links allow you to prominently promote contact avenues across your site. They act as visual cues inviting users to get in touch.

Mailto links can be configured with additional parameters beyond just the recipient’s email address:

Multiple Recipients

You can specify multiple recipient email addresses separated by commas:

<a href="mailto:[email protected],[email protected]">Contact Us</a>

This prefills both email addresses into the “To:” field.

CC and BCC

The cc and bcc parameters allow copying additional recipients:

Subject Line

Include a prefilled subject line using the subject parameter:

<a href="mailto:[email protected]?subject=Website%20Inquiry">Contact Us</a>

Note you need to replace spaces with %20.

Body Content

Prefill the email body using the body parameter:

<a href="mailto:[email protected]?body=I%20wanted%20to%20ask...">Contact Us</a>

Use %20 for spaces and %0D%0A for newlines.

Open in New Window

Add target=”_blank” to open the user’s email client in a new browser tab or window:

<a href="mailto:[email protected]" target="_blank">Contact Us</a>

This allows them to return to your site afterwards.

While mailto links provide a convenient way to initiate emails from websites, there are some scenarios where they may not work as anticipated:

Incorrect Default Client

If the user’s default email client is misconfigured or unavailable, the mailto link will fail. For example, clicking a mailto link with Outlook set as the default will do nothing if Outlook isn’t installed.

Webmail Login Required

For web-based email clients like Gmail, the user must be logged into their account for the link to work properly. Otherwise, it may open a generic login page rather than the composition window.

Blocked by Browser Extensions

Some browser extensions that block JavaScript may also disable the mailto functionality, causing the link to fail silently.

Browser/OS Limitations

On older or limited browsers and operating systems, mailto behavior may be restricted. For example, the link may open the composition window but not prefill the fields.

Email Harvesting for Spam

Email addresses in plain text mailto links can be automatically harvested for spamming purposes. Obfuscation techniques have limitations and often get detected.

User Confusion

Less tech-savvy users may not understand what a mailto link does. Without clear context, they may abandon trying to use it.

Alternative Contact Options Besides Mailto

If the potential drawbacks of mailto links are a concern, there are a few alternative options:

Plain Text Email Addresses

Rather than linking the email, simply include it in plain text on the page for users to manually copy and paste. However, this does nothing to obscure it from spammers.

Contact Forms

Forms allow collecting structured contact request messages without explicit email addresses. However, this requires setting up server-side form processing.

Feedback Widgets

Third-party feedback widgets like UserEcho embed customizable forms to capture user inquiries while keeping emails protected.

Live Chat

Chat solutions provide real-time conversations directly on your site as an alternative channel to email for answering questions.

Provide links to social profiles as alternative ways users can message you (although these are public communication methods).

Direct Messaging

Allow logged-in users to send private messages through member accounts or app interfaces. This provides a secure contact option.

Here are some tips to use mailto links effectively:

  • Place Links Strategically: Add mailto links in locations where users expect to find contact information, like headers and footers.
  • Label Links Clearly: Use descriptive link text like “Contact Us” instead of vague phrases or bare email addresses.
  • Set Context: Include text explaining what the link is for. For example, “Questions? Email our support team directly for fast help.”
  • Customize Thoughtfully: Only prefill details that apply for general inquiries. Avoid over-customizing mailto links.
  • Obscure Email Addresses: Use obfuscation, when possible, but recognize its limitations in stopping spam bots.
  • Ensure Accessibility: If styling links, ensure they remain visible and usable for those with disabilities.
  • Consider Alternatives: Evaluate if email is the optimal contact method for the situation.
  • Test Extensively: Verify that mailto links work as expected across different devices, browsers, and platforms.
  • Track Performance: Use analytics to see if mailto links are being engaged and optimize as needed.