DreamweaverFAQ.com
Search the site!Search DWfaq.com | Print This PagePrinter Friendly Page
Current: Default | Default: Vino


DreamweaverFAQ.com » Tutorials » Miscellaneous » Not Your Typical Links- Mailto, Telnet & News


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:?To=who@domain.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 & News

Using Mailto links

Here's how to do it the hard way.

FORMAT:
mailto:?To=user@domain.com

OPTIONS:
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.
&cc=addressee

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 "&".

EXAMPLE:

mailto:?To=me@quaffer.net&subject=How%20are%20You&
   cc=metoo@quaffer.net&bcc=measwell@quaffer.net&
   body=Just saying hello!

Try it!

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.

Link Text:
Recipient:
Subject:
Cc:
Body:
   

Using Telnet links

FORMAT:
telnet://servername:port Note: The port number is only required if it isn't 23, the standard telnet port.

OPTIONS:
You can include a username and password in the link if necessary

EXAMPLE:
<a href="telnet://username:password@servername:777">Telnet</a>

 

Using News Links

FORMAT:
news://servername

OPTIONS:
You can specify newsgroup if you want. i.e. news://servername/newsgroup

EXAMPLE:

<a href="news://forums.macromedia.com/macromedia.dreamweaver">Dreamweaver NG</a>

Try it!

Using FTP Links

FORMAT:
ftp://servername/path:port Note: The port number is only required if it isn't 21, the standard FTP port.

OPTIONS:
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 binary.

EXAMPLES:

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>

Available Extension(s)

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.

Related Tutorials

Not your typical links- URL encoding
by Colm Gallagher
URL: http://www.dwfaq.com/Miscellaneous/special_links_encoding.asp

::This page last modified 8/13/2013 at 04:37::

Copyright © 2001-2024 DreamweaverFAQ.com All Rights Reserved.
All brands, trademarks, tutorials, extensions, code, and articles are the property of their respective owners.
A production of Site Drive Inc.
Legal Notice | Privacy Policy | Disclaimer & Notice