Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I create comprehensive MAILTO links?

Creating MAILTO Links

How do I create comprehensive MAILTO links?

by  MikeBarone  Posted    (Edited  )
Description:
Create comprehensive mailto links using the instructions and code shown below. Configure To, CC, Bcc, Subject, and Body information!

Directions:
Below you will find the code required to create a complete mailto link. Read a little about the configurations that are possible so you will know how to edit the code.

mailto: can do more than provide a way to send email to you from your site. When used as an <A HREF> tag, one email can be sent to multiple addresses. Not only that, but any combination of those addresses can be tagged as To: (regular), Cc: (carbon copy), or Bcc: (blind carbon copy) addresses. You can also set default text for the Subject: line and the email body!

Mailto links can send email to multiple recipients. Add additional email addresses after the first, separated by a comma:

Code:
example: <a href=" mailto: email1@email.com, email2@email.com, email3@email.com">

You can select additional email commands as well:

Sender is the person who selects the mailto: link
Recipient is the person who will receive the mailto: email

TO ( same as using comma in the mailto: line)
Recipient's name will appear in the To: line, along with all the other To: addresses. Sender will see all addresses in the To: line. Recipient will see all addresses in the To: line. Can be changed by Sender.
CC ( carbon copy)
Recipient's name will be in the Cc: line, along with all the other Cc: addressees. Sender will see all addresses in the Cc: line. Recipient will see all addresses in the Cc: line. Can be changed by Sender.
BCC ( blind carbon copy)
Recipient's name will appear in the Bcc: line, along with all the other Bcc: addresses. Sender will see all addresses in the Bcc: line. Recipient will see no addresses in the Bcc: line. Can be changed by Sender.
SUBJECT ( default text for subject line)
Text following this command will appear in the Subject: line. Can be changed by Sender.
BODY ( default text for email body)
Text following this command will appear in the Body of the email. Can be changed by Sender.

Code:
Here is an Example:
<a href="mailto:contact@cgiscript.net, contact1@cgiscript.net?subject=Mailto Test Subject text&cc=contact3@cgiscript.net&bcc=contact4@cgiscript.net&body=Test mailto body message">Test Mailto Link</a>


+ + + + + +
Mike Barone
www.cgiscript.net
FREE and Pro CGI/Perl Scripts

FREE Scripts
www.cgiscript.net/scripts.htm
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top