sets the subject and body text


<a href="mailto:address?subject=&body=">

Browser
Internet Explorer Firefox Opera
Type
Inline

When the href attribute of the A element is set as follows, you can set default text for the subject and body of the email.


<a href="mailto:info@example.com?subject=Inquire&body=Your%20message">send mail</a>


Attribute Value Explanation
href=" " mailto:Email address "mailto:" and the Email address

info@example.com?subject=Inquire&body=Your%20message

? : The email address is separated from the other information by a "?".
subject= : Specifies the subject of the email.
body= : Specifies the body text of the email.
& : The subject and body are separated by a "&".
%20 : Spaces between words.

The "CC" and "BCC" can also be specified.

info@example.com?cc=cc@example.com&bcc=bcc@example.com&subject=Inquire&body=Your%20message

cc= : Specifies the CC (Carbon Copy) address.
bcc= : Specifies the BCC (Blind Carbon Copy) address.


Example

(The email address is a dummy. Please do not send email to the dummy address.)


Subject

<p><a href="mailto:info@example.com?subject=Inquire">Open the email client</a></p>
Output

Body

<p><a href="mailto:info@example.com?body=Your%20message">Open the email client</a></p>
Output

Subject and Body

<p><a href="mailto:info@example.com?subject=Inquire&body=Your%20message">Open the email client</a></p>
Output

CC and BCC

<p><a href="mailto:info@example.com?cc=cc@example.com&bcc=bcc@example.com">Open the email client</a></p>
Output

Everything is specified

<p><a href="mailto:info@example.com?cc=cc@example.com&bcc=bcc@example.com&subject=Inquire&body=Your%20message">Open the email client</a></p>
Output