How to Create a Mailto Link

Email Links on Your Website - Part 2

Email @-sign - Image © Michael Bretherton
Image © Michael Bretherton

Every website has a "win". This is the action that the company or person who owns the website would like visitors to do once they are on that site. Most websites can have different possible "wins". For example, a site may allow you to sign up for an email newsletter, register for an event, or download a whitepaper. All of these are legitimate wins for a site. One "win" that many sites include, especially ones for companies who offer some kind of professional service (lawyers, accountants, consultants, etc.) is when a visitor contacts that company for more information or to schedule a meeting.

This outreach can be done in a number of ways. Making a phone call is obviously a great way to connect with a company, but since we are talking about websites and the digital space, let's think about ways to connect that are purely online. When you consider this scenario, email is likely to most obvious way to make this connection, and one way you can connect via email with site visitors is to include what is known as a "mailto" link on your site.

Mailto links are links on web pages that point to an email address instead of to a web page URL (either somewhere else on your site or out on the Web on another site) or another resource like an image, video, or document. When a website visitors clicks on one of these mailto links, the default email client on that person's computer opens and they can send a message to that email address specified in the mailto link.  For may users with Windows, these links will pop open Outlook and have an email all ready to go based on the criteria you have added to the "mailto" link (more on that shortly).

These email links are a great way to provide a contact option on your website, but they do come with some challenges (which we will also cover shortly).

Creating a Mailto Link

To create a link on your website that opens an email window, you simply use a mailto link. For example:

<a href="mailto:webdesign@aboutguide.com">Send me an email</a>

If you want to send email to more than one address, you simply separate the email addresses with a comma. For example:

<a href="mailto:email1@aboutguide.com,email2@aboutguide.com">

In addition to the address that should receive this email, you can also set up your mail link with a cc, bcc, and subject. Treat these elements as if they were arguments on a URL. First you put the to address as above. Follow this with a question mark (?) and then the following:

  • cc=emailaddress for a Cc
  • bcc=emailaddress for a Bcc
  • subject=subject text for a Subject

If you want multiple elements, separate each with an ampersand (&). For example (write this all on one line, and remove the » characters):

<a href="mailto:html@aboutguide.com? »
bcc=gethelp@aboutguide.com »
&subject=testing">

 

The Downside of Mailto Links

As easy as these links are to add, and as helpful as they can be for many users, there are also downsides to this approach. Using mailto links can lead to spam being sent to the emails specified in those links. Many spam programs exist that crawl websites harvesting email addresses to use in their spam campaigns or to perhaps sell to others who will use these emails in this fashion. In truth, this is one of the most common ways that spammers get email addresses to use in their schemes!

It has been used by spammers for years and there really is no reason for them to stop this practice since these crawls produce lots of email addresses that they can use.

Even if you don’t get a lot of spam, or have a good spam filter to try to block this type of unsolicited and unwanted communication, you might still get more email than you can handle. I've spoken to many people who get dozens or even hundreds of spam emails a day! To help prevent this from happening, you can consider using a web form on your site instead of a mailto link.

Using Forms

If you are worried about getting an unwieldy amount of spam from you site, you may want to consider using a web form in place of a mailto link.Those forms can also give you the ability to do more with these communications, since you can ask specific questions in a way that a mailto link does not allow for.

With the answers to your questions, you may be able to better sort through email submissions and respond to those inquires in a more informed manner.

In addition to being able to ask more question, using a form also has the advantage of not (always) printing an email address on the web page for spammers to harvest.

Written by Jennifer Kyrin. Edited by Jeremy Girard on 4/3/17

Format
mla apa chicago
Your Citation
Kyrnin, Jennifer. "How to Create a Mailto Link." ThoughtCo, Apr. 3, 2017, thoughtco.com/how-to-create-a-mailto-link-3466469. Kyrnin, Jennifer. (2017, April 3). How to Create a Mailto Link. Retrieved from https://www.thoughtco.com/how-to-create-a-mailto-link-3466469 Kyrnin, Jennifer. "How to Create a Mailto Link." ThoughtCo. https://www.thoughtco.com/how-to-create-a-mailto-link-3466469 (accessed November 19, 2017).