mailto links in Gmail

sagibb picture sagibb · Jan 16, 2011 · Viewed 44.3k times · Source

I've encountered a problem with Gmail's web application. For some reason, the mailto links doesn't work when I try to add the body into the link. The links works fine as long as the & separator for the body is not used.

For example:

href="mailto:?subject=test&body=this is a test" - Doesn't work

href="mailto:?subject=testbody=this is a test" - Does work but, obviously, it doesn't generate the desired result as everything goes to the subject.

I am running Vista 64bit and I've tried FF, Chrome and IE. Also, I've noticed a difference between how Gmail renders my mail in my Gmail account and Google Apps account.

When i view the same email on my iPhone & Outlook everything seems to work fine.

Any help will be appreciated.

Answer

Mohit Kumar Gupta picture Mohit Kumar Gupta · Aug 2, 2013

The Full mailto Link Syntax For Cross Browser

<a href="mailto:[email protected]?subject=subject&[email protected]">mail link</a>

Here are the variables you can use in mailto links:

mailto: to set the recipient, or recipients, separate with comma

&cc= to set the CC recipient(s)

&bcc= to set the BCC recipient(s)

&subject= to set the email subject, URL encode for longer sentences, so replace spaces with %20, etc.

&body= to set the body of the message, you can add entire sentences here, including line breaks. Line breaks should be converted to %0A.

Some mailto link examples

<a href="mailto:[email protected][email protected]&[email protected]&subject=Subject Using Mailto.co.uk&body=Email Using Body">Email-Link</a>

Multiple Recipients:

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

Online Generation Link : http://www.mailto.co.uk/