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, and refined in RFC 6068, published in October 2010.
Using "mailto" within an HTML document to generate a link for sending email:
<a href="mailto:firstname.lastname@example.org">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@example.com?subject=Thisfirstname.lastname@example.org&body=This%20is%20the%20body">Send email</a>
Multiple addresses can also be specified:
<a href="mailto:email@example.com,firstname.lastname@example.org">Send email</a>
The address can also be omitted:
<a href="mailto:?to=&subject=mailto%20with%20examples&body=https://en.wikipedia.org/wiki/Mailto">Share this knowledge...</a>
Security and privacy
This section needs additional citations for verification. (September 2015) (Learn how and when to remove this template message)
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.