HTML mailto command (the mailto Syntax)

In one of my article I told you about how to make html mailers. Now I am going to tell you about html mailto command. The mailto command just create hyperlinks that will directly launch the default email software and compose a new email message. Every designer and developer probably know how to use the mailto command for quickly linking to one email address but there is so much more that you can do with the mailto links.

you can address the same message to multiple addresses, add cc (to send a carbon copy ), bcc(to send a blind carbon copy ) or subject fields, and even write text inside the email body.

The mailto Syntax

Send simple email to

<a href=”mailto:emailid@yourmail.com”>Send simple mail to</a>

Send an email to multiple recipients

<a href=”mailto:emailid@yourmail.com,mailto:emailid2@yourmail.com,mailto:emailid3@yourmail.com,mailto:emailid4@yourmail.com”>Send an email to multiple recipients</a>

Send a email to with carbon copy (CC)

<a href=”mailto:emailid@yourmail.com?cc=emailid2@yourmail.com”>Mail to with a copy (CC)</a>

Send a email to with blind carbon copy (bCC)

<a href=”mailto:emailid@yourmail.com?bcc=emailid2@yourmail.com”>Send a email to with  blind carbon copy (bCC)</a>

Send a email to with cc and bcc both

<a href=”mailto:emailid@yourmail.com?cc=emailid2@yourmail.com&amp;bcc=emailid2@yourmail.com”>Mail to with a copy (CC)</a>

Send a email to with subject

<a href=”mailto:emailid2@yourmail.com?subject=this is a tutorial”>Send a email to with  subject</a>

Send a email to with message already started in Body

<a href=”mailto:emailid@yourmail.com?body=I like this article”>message already started in Body </a>

Send a email to with cc, bcc, a subject

<a href=”mailto:emailid@yourmail.com?Subject=Your Next Show &amp;cc=emailid2@yourmail.com&amp; bcc=emailid2@yourmail.com&amp;Body=I can’t wait for the next show!”>Send a email to with cc, bcc, a subject</a>

You may use any substitutions and combinations while writing a mailto hyperlink but make sure that there’s only one “?” character. And To add multiple elements, separate the second and subsequent elements with an ampersand (&).

cheers!!
Joginder Poswal

Tags: ,

This entry was posted on Thursday, August 20th, 2009 at 12:42 am and is filed under Web Design, Web Standard. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply

This blog is kept spam free by WP-SpamFree.

 

Get Adobe Flash player