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>

No related posts.

If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.

Comments

old trick but it works for us,.. thanks!!

regards,
Aji

Leave a comment

(required)

(required)