SENDING MAIL TO MULTIPLE RECIPIENTS
Add additional email addresses after the first, seperated by a ",":mailto: foo@bar.com, bar@foo.com, buffy@slayer.com
ADDITIONAL MAILTO: COMMANDS
Sender is the person who selects the mailto: link
Recipient is the person who will receive the mailto: email
- TO - same as using "," 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. NOTE: You can add linefeeds to text in the body by adding the hex code of a linefeed, %0A where you want the linefeed.
| If you set up your form correctly, you can have the completed form emailed to you instead of to some other post-processing function via a cgi-script or other method once the user hits the submit button. This is a great option for those who don't have access to cgi.
When using mailto: in forms, the method should be set to POST and the mailto: goes in the action tag, using any of the options mentioned on this page.
<form method=post action="mailto:foo@bar.com, bar@foo.com, buffy@slayer.com" enctype="text/plain">
. . . (form data goes here) . . .
</form>
So that the data sent to you is posted in the body of the email and not the subject, use the enctype="text/plain" command in the form tag. |
OKAY, SO HOW DO I DO IT?
All of the options are added in the mailto: tag. Here's the format:
<a href="mailto:first_email_address[,second_email_address] [, etc...] [?option=variable] [&option=variable] [&next option=variable] [&etc...] ">
EXAMPLE:
<a href="mailto:foo@bar.com, bar@foo.com?subject=Suspicion Breeds Confidence&cc=barfoo@foobar.com&bcc=secretfoo@bar.com"> |
Just place this code with your desired email addresses on your page and you're set to go!
THE RULES...
- The ? and & are used to identify the options selected.
- The ? must be used first, and only once. The & can be used as many times as needed.
- If you start with a &, then everything after it is interpreted as a separate To: address.
- Spaces can be used with the Subject: and Body: options, but spaces found in any of the address options (To:, Cc:, etc.) are interpreted as commas and will be parsed into separate entries, like this:
Sample: ...&cc=Use CC for comment...
Result:
Cc: Use
Cc: CC
Cc: for
Cc: comment
- Apparently, the entire
mailto: string is limited to 256 characters. This should not be a problem unless you are planning on a lengthy body statement.
THE CATCH : Reliable, it ain't...
Well, you knew there had to be one, otherwise, everyone would be using mailto:'s on their pages!
The problem with using the mailto: method is its unpredictability. There are some email programs that just won't play well with the mailto: command and if they do, they ignore the special commands described on this page. Outlook Express is the most-reported offender.
For all intents and purposes, the mailto: command and its features should never be used for critical email. By being able to add some extra content like cc:'s and subject lines, most (or some) of the email can be sufficiently "marked" to stand out when you download your email.
If you need these features in a more critical situation, then cgi's or JavaScript is the best way to go. I know that's probably not what you want to hear, but mailto: cgi's are available by the truckload on the Web and can do what I've mentioned and much, much more.
CATCH 2 : The user must play along...
For mailto: to work, the user's broswer must be set up for email. Yes, I know it's like pulling teeth to get users to make any change to their browser settings, but if they don't have email set up, mailto: will sit there like undefrosted hash browns. So, you can either trust your visitors to have email set up, or give them directions on what to do if mailto: isn't working...
|
Internet Explorer Instructions
- Open Internet Explorer.
- Choose Internet Options in the View menu.
- Go to the Programs tab.
- Select a program under the mail drop down menu. If you don't
have any options you will have to download an e-mail program. Outlook Express interfaces with Internet Explorer well.
- Once you have selected a program you will have to configure it to send outgoing mail. If your server does not work with external programs then just enter your e-mail address and use mail as your server. The program might ask for a user name if it does then just use whatever username you have for your e-mail account.
Netscape 4.0+ Instruction
- Open Netscape.
- Choose Preferences from the Edit menu.
- Click on the box next to Mail and Newsgroups in the list.
- Select Identity.
- Enter your e-mail information into the fields.
- Select the Mail Servers.
- Enter your e-mail server information. If your e-mail service is not compatible with external e-mail programs then use mail as your server.
Netscape 3.0- Instructions
- Open Netscape.
- Choose Mail and News Preferences under the options menu.
- Choose the Identity tab.
- Enter your e-mail information into the fields.
- Select the Servers tab.
- Enter your e-mail server information. If your e-mail server is not compatible with external e-mail programs then use mail for your server.
|
CATCH 3: Only manual. No automatic...
As far as I know, there is no way to get mailto: to automatically send an email, such as to use this function to to automatically email you when someone visits a particular page. Once the mailto: command is called, all control is passed over to the email client along with the email properties you've defined.
Well, I hope this page helps you with the most-undocumented mailto: command. If you have any questions or comments, you can email Network 23. |