mailto: Links with Parameter

Recipient (to), CC, BCC, Subject and Message Body

mailto: Link

A click on a mailto link opens the user's mail program to send an email to the email address defined in the mailto link.

 

Syntax:

mailto:someone@somedomain.tld

Important: Use mailto: not mailto:// (!)

 

HTML Sample:

<a href="mailto:someone@somedomain.tld">Contact</a>

mailto: Link with Parameter

The parameters are appended to the link with a question mark. Multiple parameters are appended with an ampersand.

 

 

In addition to the recipient, a copy of the message can be sent to other recipients. The parameters CC and BCC are used for this.

 

Carbon Copy (CC):

mailto:someone@somedomain.tld?cc=john@somedomain.tld

Blind Carbon Copy (BCC):

mailto:someone@somedomain.tld?bcc=jane@somedomain.tld

 

 

The subject parameter is used to define the subject of the message.

 

Subject:

mailto:someone@somedomain.tld?subject=Hello

It is important to note that the subject must be URL-encoded, e.g. a space in "Hello World" becomes %20 so that the subject would be "Hello%20World".
See also: Percent-encoding on Wikipedia

mailto:someone@somedomain.tld?subject=Hello%20World

 

 

The body of the message can be specified with the body parameter.

 

Body:

mailto:someone@somedomain.tld?body=Hello

It is important to note that the body must be URL-encoded, e.g. a space in "Hello World" becomes %20 so that the body would be "Hello%20World".
See also: Percent-encoding on Wikipedia

mailto:someone@somedomain.tld?body=Hello%20World

 

 

Multiple Parameter

Multiple parameters in a mailto link are appended with an ampersand.

 

Sample:

mailto:someone@somedomain.tld?subject=Hello&body=Hello%20World

HTML Sample:

<a href="mailto:someone@somedomain.tld?subject=Hello&amp;body=Hello%20World">Contact</a>

Disclaimer: The information on this page is provided "as is" without warranty of any kind. Further, Arclab Software OHG does not warrant, guarantee, or make any representations regarding the use, or the results of use, in terms of correctness, accuracy, reliability, currentness, or otherwise. See: License Agreement