Add A Subject And Body Text To A HTML Mailto Command

This is not really my sort of thing but I noticed that when companies  have enquiry email addresses they sometimes automatically fill the subject field in the email and sometimes even fill part of the email body out. I was wondering how they did this so had a dig into it.

So normally you use the command below to email making sure you open and close the command with < and >.

<a href=""></a>

As you will see if you click on the email address above it will open up your mail client and populate the email field. To add a subject use the command below.

<a href=" your subject here"></a>

Now you will see that if you click on you will see that the subject field is populated.

Finally, if you would like to add content to the body of the email use the command below.

<a href=" your subject here&body=whatever txt you want in the body"></a>

So now when you click on you will see the body and field is pre populated in the email

Tags: html

Allen White

Allen is an IT Consultant and holds the following accreditations. MCSA, MCSE, MCTS, MCITP, CCA, CCSP, VCP 4,5, 6 and HP ASE, AIS - Network Infrastructure.

Leave a comment



What Web Browser Do You Use?

View Results

Loading ... Loading ...


What do you prefer..VMware or Hyper-V?

View Results

Loading ... Loading ...