Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Mailto
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|URI scheme for linking email addresses}} {{confused|Malito}} {{lowercase}} '''mailto''' is a [[Uniform Resource Identifier]] (URI) scheme for [[email addresses]]. It is used to produce [[hyperlink]]s on [[websites]] that allow users to send an [[email]] to a specific address directly from an [[HTML]] document, without having to copy it and entering it into an [[email client]]. It was originally defined by [[Request for Comments]] (RFC) 1738 in December 1994,<ref>{{cite web|url=https://tools.ietf.org/html/rfc1738|title=Uniform Resource Locators (URL)|author1-first=T.|author1-last=Berners-Lee|author2-first=Larry|author2-last=Masinter|author3-first=M.|author3-last=McCahill|date=December 1994|accessdate=11 September 2021}}</ref> expanded by <nowiki>RFC</nowiki> 2368 in July 1998,<ref>{{cite web|url=https://tools.ietf.org/html/rfc2368|title=The mailto URL scheme|author1-first=Paul|author1-last=Hoffman|author2-first=Larry|author2-last=Masinter|author3-first=Jamie|author3-last=Zawinski|author3-link=Jamie Zawinski|date=July 1998|accessdate=26 September 2015}}</ref> and refined by <nowiki>RFC</nowiki> 6068 in October 2010.<ref name="rfc6068">{{cite web|url=https://tools.ietf.org/html/rfc6068|title=The 'mailto' URI Scheme|author1-first=Martin|author1-last=Duerst|author2-first=Larry|author2-last=Masinter|author3-first=Jamie|author3-last=Zawinski|author3-link=Jamie Zawinski|date=October 2010|accessdate=26 September 2015}}</ref> == Examples == "mailto" can be used within an [[HTML]] document to generate a link for sending email: <syntaxhighlight lang="html"><a href="mailto:someone@example.com">Send email</a></syntaxhighlight> Clicking on the hyperlink automatically opens the default email client, with the destination email address pre-filled. It is 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 directly embedded but must be [[Percent-encoding|percent-encoded]]:<ref>{{Cite web|url=https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/Creating_hyperlinks|title=Creating hyperlinks § E-mail links|website=MDN Web Docs|language=en|access-date=2019-09-30}}</ref> <syntaxhighlight lang="html"><a href="mailto:someone@example.com?subject=This%20is%20the%20subject&cc=someone_else@example.com&body=This%20is%20the%20body">Send email</a></syntaxhighlight> Multiple addresses can be specified:<ref name="rfc6068"/> <syntaxhighlight lang="html"><a href="mailto:someone@example.com,someoneelse@example.com">Send email</a></syntaxhighlight> The address can be omitted: <syntaxhighlight lang="html"><a href="mailto:?subject=mailto%20with%20examples&body=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FMailto">Share this knowledge...</a></syntaxhighlight>Only the initial header must use a question mark (?) prepended. All subsequent headers require an ampersand (&). Should this not be the case, the scheme will not properly copy over the headers to the email client.<ref>{{Cite web|title=RFC 6068|url=https://datatracker.ietf.org/doc/html/rfc6068#section-6.1|website=IETF Datatracker}}</ref> ==Security and privacy== {{see also|Address munging}} A number of security issues are mentioned in [https://datatracker.ietf.org/doc/html/rfc6068#section-7 RFC 6068], one of them being robotic [[address harvesting]]. Mailto constructs are locatable within HTML pages by automated means which typically include the use of [[Document Object Model|DOM]] constructs or [[regular expression]]s. Addresses harvested by such means are liable to be added to [[E-mail spam|spam]]mers' 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 (software)|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 [[Form (HTML)|web forms]], which experience similar challenges with preventing spam. == References == <references /> {{URI scheme}} [[Category:Email]] [[Category:URI schemes]] [[Category:Web 1.0]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Cite web
(
edit
)
Template:Confused
(
edit
)
Template:Lowercase
(
edit
)
Template:See also
(
edit
)
Template:Short description
(
edit
)
Template:URI scheme
(
edit
)