Q. How can I make an E-mail link add the subject line automatically?
A. You will need to add some simple URL encoding. For example,
to add the subject your link would look something like: mailto:?Toemail@example.com&subject=Please%20help%20me
To learn how to do this, other mailto tricks, Telnet, and news links,
see the tutorial below.
Not your typical Links- Mailto, Telnet &
Author's Site: ColmGallagher.com
Using Mailto links
Here's how to do it the hard way.
Automatically add the subject.
&subject=subject Note: If you want spaces
in the subject they need to be written as %20 (See URL
Encoding Page for an explanation and some other useful characters).
Automatically add a carbon copy address.
Automatically add a blind carbon copy.
&bcc=addressee (Not standards compliant so cannot be relied upon)
Automatically add body content.
&body=your text goes here
Tip: You can string combinations of these options
together by joining them with "&".
body=Just saying hello!
You can save yourself the trouble of hand coding the link by using the
form below. It'll even encode your links if you want.
Using Telnet links
telnet://servername:port Note: The port number
is only required if it isn't 23, the standard telnet port.
You can include a username and password in the link if necessary
Using News Links
You can specify newsgroup if you want. i.e. news://servername/newsgroup
<a href="news://forums.macromedia.com/macromedia.dreamweaver">Dreamweaver NG</a>
Using FTP Links
ftp://servername/path:port Note: The port number
is only required if it isn't 21, the standard FTP port.
You can add a username and/or password to the link if necessary. (Not
always appropriate, for obvious reasons) If you want to link to a directory,
you may append ";type=d" to the url. If you're lnking directly
to a file for download and you need it to be downloaded as ASCII you may
need to append ";type=a" to your URL because FTP defaults to
User will be prompted for a password:
<a href="ftp://username@servername/path;type=d">Visit our FTP Site</a>
User won't need to enter a password:
<a href="ftp://username:password@servername/path;type=d">Visit our FTP Site</a>
There are 3 dreamweaver extensions on the Macromedia
Dreamweaver Exchange site at the time of writing that will create
advanced E-mail links. They are "Advanced E-mail Link" by Nathan
Pitman, "E-mail" by Rabi Sunder Raj and "Super E-mail"
by Aitor Asencor - Digital Media. A search for "E-mail" should
find them and any new ones added since.
Not your typical links- URL encoding
by Colm Gallagher