Environmental Science Home Page ES Mailto: tutorial
Courses -Admissions -Research -Contacts -Admin -Index

Template Tutorial
Template

ES Mailing Lists

List Guidance


 

Lancaster University
Web Guidance

Mailto:

Using a Mailto: is an easy way to allow for email feedback
  • It automatically generates an email message window for the user.
  • You can specify CC:("carbon copy") - so as to send the message to more than one person
  • You can automatically fill in the subject line allowing you to set up mail filters
    TOOLS - MESSAGE RULES - MAIL in Outlook Express
    EDIT - MESSAGE FILTERS in Netscape Mail

A basic mailto:

to open users default email program to send an email message to whoever@wherever.ac.uk

<A href="mailto:whoever@wherever.ac.uk">Click here</a>

produces:- Click here

Adding a copy (CC:) field:

to send an email message to whoever@wherever.ac.uk and whoeverelse@wherever.ac.uk
follow the mailto: recipient's email address with ?cc=:

e.g.

<A href="mailto:whoever@wherever.ac.uk
?cc=whoeverelse@wherever.ac.uk?">
Click here </a>

produces:- Click here

Substitute bcc for cc in above for bcc.

Adding a Subject field:

to send an email message with the subject "Whatever you want" to whoever@wherever.ac.uk
follow the mailto: recipient's email address with ?subject=.
For spaces in the subject line you have to use %20

e.g.

<a href="mailto:whoever@wherever.ac.uk
?subject=Whatever%20you%20want">
Click here</a>

produces:- Click here

N.B. if using multiple options
the first extra field is prefixed with a ? and subsequent ones with an &

e.g. An example of several options at once:

to send an email message with the subject "Whatever you want"
to whoever@wherever.ac.uk and whoeverelse@wherever.ac.uk

<a href="mailto:whoever@wherever.ac.uk
?cc=whoeverelse@wherever.ac.uk
&subject=Whatever%20you%20want">
Click here</a>

produces:- Click here

Adding a text to a Message:

to send an email message with the subject "Whatever you want"
and the text "Help I'm stuck in a web page" to whoever@wherever.ac.uk

<a href="mailto:whoever@wherever.ac.uk
?subject=Whatever%20you%20want
&body=Help%20I'm%20stuck%20in%20a%20web%20page">
Click here</a>

produces:- Click here

Automated Message Procedure:

A Javascript form to do all the above is available here

JavaScript to include current URL in body:

<script language="JavaScript">
<!-- 

document.write ("<a href='mailto:w@w.ac.uk?subject=P&body=Re%20"+location.href+"'>Here</a>")

// -->
</script>
produces:-

Email address encoding page:

This generates appropriate javascript (which most browsers should support) to present a version of a mailto: link which is impervious to harvesting by web crawlers.

Available offsite: Here
and with more fields Here.

To the Top

es-webmaster@lancaster.ac.uk 00/00/00