Mailto Links

Basic

Open default mail program, create new message with the TO field already filled out.

HTML

<a href="mailto:someone@yoursite.com">Email Us</a>

Adding a subject

Open default mail program, create new message with the TO and SUBJECT field already filled out. Essentially we are adding the parameter subject to the href value.

Spaces in the subject will probably work OK, but to be super-extra sure, you can replace spaces with “%20”.

HTML

<a href="mailto:someone@yoursite.com?subject=Mail from Our Site">Email Us</a>

Adding CC and BCC

Open default mail program, create new message with the TO, SUBJECT, CC, and BCC field already filled out. Essentially we are adding the parameters cc and bcc to the href value.

Also note that you add multiple values to CC and BCC by comma separating them.

HTML

<a href="mailto:someone@yoursite.com?cc=someoneelse@theirsite.com, another@thatsite.com, me@mysite.com&amp;bcc=lastperson@theirsite.com&amp;subject=Big%20News">Email Us</a>

Adding Body Text

Just add the body parameter into the ever-growing list of parameters we are using.

HTML

<a href="mailto:someone@yoursite.com?cc=someoneelse@theirsite.com, another@thatsite.com, me@mysite.com&amp;bcc=lastperson@theirsite.com&amp;subject=Big%20News&amp;body=Body-goes-here">Email Us</a>

424 total views, 1 views today

Loading Facebook Comments ...

No comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Enter the captcha code *

Please wait...

Subscribe to our newsletter

Want to be notified when our article is published? Enter your email address and name below to be the first to know.

Coupon Code "HAPPY10" - Get Discounts upto 90% + 10% off on Purchase of themes/templates and Plugins