Old trick – Populating Subject and Body of Email Using mailto

As I have previously stated, I do my best to use mailto as infrequently as possible because of all the associated problems.  Occasionally, clients will request this functionality regardless of the consequences.  Today I had to post a mailto link in Flash for which I wrote this tutorial. To expand on that link, the client also wanted us to populate the email with a subject and body content.

Using HTML, I have populated the subject of mailto links many times but I had never attempted to populate the body. It turns out it works just the same as subject and couldn’t be any easier.  I thought this may be the case, so I tried it before I looked around and it worked.  It is not too often that this method of coding works for me, but I got lucky for once.

Here is the code if you don’t know what I am talking about:

<a href="mailto:email@address.com?subject=This is the Subject&amp;body=This is the content of the email.">Email Link</a>

Quoted from: stemkoski.com


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s