Helping you build a better website
(and other interesting web stuff)

CSSHTMLJavaScriptjQueryMSSQLMySQLPHPSilvaTechnologiesWordpress
Silva Web Designs - Blog

How to Add Mailto Links / Including a Subject, CC, BCC and Body Text

The Standard Way

This will open your default mail program and will create a new message with the ‘TO’ field already filled out.


<a href="mailto:[email protected]">Email Us</a>  

Adding a Subject

This will open your default mail program and will create a new message with the ‘TO’ and ‘SUBJECT’ field pre-populated. We’re essentially adding the parameter subject to the href value.

Spaces in the subject will probably work just fine, but a better way to add spaces is to replace them with "%20".


<a href="mailto:[email protected]?subject=Awesome, the subject is pre-populated">Email Us</a>  
<!-- or -->
<a href="mailto:[email protected]?subject=Awesome,%20the%20subject%20is%20pre-populated">Email Us</a> 

Adding CC and BCC

This will open your default mail program and create a new message with the ‘TO’, ‘SUBJECT’, ‘CC’, and ‘BCC’ field already filled out. We’re essentially 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 😉


<a href="mailto:[email protected][email protected], [email protected], [email protected]&[email protected]&subject=Woohoo,%20We're%20nailing%20it!">Email Us</a>  

Adding Body Text

For this one, just add the body parameter into the super long mailto we’ve been creating!


<a href="mailto:[email protected][email protected], [email protected], [email protected]&[email protected]&subject=Woohoo,%20We're%20nailing%20it!&body=Now%20we've%20got%20body%20text,%20pretty%20sweet%20huh?">Email Us</a>  

If you’ve reached this point, you’re now a superhero in adding mailto links!

Nathan da Silva - Profile

Posted by: Nathan da Silva

Nathan is the Founder of Silva Web Designs. He is passionate about web development and web site design. His expertise is WordPress & Magento as well as many other frameworks. Would you like to work with Nathan? Send him an email on [email protected]

It’s good to share

Join the discussion