From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

mailto is a Uniform Resource Identifier (URI) scheme for email addresses. It is used to produce hyperlinks on websites that allow users to send an email to a specific address without first having to copy it and enter it into an email client. It was originally defined in Request for Comments (RFC) 2368, published in July 1998,[1] and refined in RFC 6068, published in October 2010.[2]


Using "mailto" within an HTML document to generate a link for sending email:

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

It is also possible to specify initial values for headers (e.g. subject, cc, etc.) and message body in the URL. Blanks, carriage returns, and linefeeds cannot be embedded but must be percent-encoded.

<a href="mailto:[email protected]?subject=This%20is%20the%20subject&[email protected]&body=This%20is%20the%20body">Send email</a>

Multiple addresses can also be specified:[2]

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

The address can also be omitted:

<a href="mailto:?to=&subject=mailto%20with%20examples&body=">Share this knowledge...</a>

Security and privacy

A number of security issues are mentioned in RFC2368, however the greatest concern is that of robotic address harvesting. Mailto constructs are locatable within HTML pages by automated means which typically include the use of DOM constructs or regular expressions. Addresses harvested by such means are liable to be added to spammers' mass-mailing lists and thus to receive large amounts of unwanted mail.

While methods exist to "harden" mailto links against harvesting—address munging and JavaScript-based address obfuscation among them—these protections can be circumvented by sufficiently sophisticated harvesting robots. Other techniques, like walling the address behind a CAPTCHA or similar "humanity check", provide security on par with that available for other contact methods, most notably web forms, which experience similar challenges with preventing spam.


  1. ^ Hoffman, Paul; Masinter, Larry; Zawinski, Jamie (July 1998). "The mailto URL scheme". Retrieved 26 September 2015.
  2. ^ a b Duerst, Martin; Masinter, Larry; Zawinski, Jamie (October 2010). "The 'mailto' URI Scheme". Retrieved 26 September 2015.
Retrieved from ""
This content was retrieved from Wikipedia :
This page is based on the copyrighted Wikipedia article "mailto"; it is used under the Creative Commons Attribution-ShareAlike 3.0 Unported License (CC-BY-SA). You may redistribute it, verbatim or modified, providing that you comply with the terms of the CC-BY-SA