Email tricks with mailto links from your web site

How to create a basic email link on a web page

To create an email link from a web page you use this simple bit of code:

<a href="mailto:name@domain.co.uk>page text here</a>

Example:

<a href="mailto:julie@domain.co.uk>julie@domain.co.uk</a>

or:

<a href="mailto:julie@domain.co.uk>email me</a>

If you are using Dreamweaver, just type the text you want to see on the page, select it and then type mailto:  followed by your email address  into the link field of the Property Inspector.
e.g.  mailto:name@domain.co.uk

 

Automatically add a subject line to your email

It is possible to add a subject line to the email automatically when someone clicks on the email link on your web page.

Example:

<a href="mailto:name@domain.co.uk?Subject=Web Enquiry">name@domain.co.uk</a>

You may have to use %20 in place of any spaces in the subject text, to ensure that the subject is handled correctly by software which can't work with the space.

Example:

<a href="mailto:name@domain.co.uk?Subject=Web%20Enquiry">name@domain.co.uk</a>

 

Create an email link to send the email to more than one email address

Use bcc or cc to add an extra address to your email link:

<a href="mailto:julie@domain.co.uk?bcc=john@domain.co.uk">contact us</a>

 

You can then combine these features together into one email link

<a href="mailto:julie@domain.co.uk?bcc=john@domain.co.uk&subject=Enquiry">contact us</a>

 

More information on email links

It is also possible to add the first line of the email message content text by adding the following after the email address:

?content=your text here

 

Dreamweaver
If you are using Dreamweaver then you just need to modify the mailto link in the link field of the Property Inspector.

e.g. the link should display as:

mailto:name@domain.co.uk

To add a subject line, change it to:

mailto:name@domain.co.uk?Subject=Web Enquiry