|
ASP
Form Emailer: mailto.asp
MAILTO will
allow you to create your own form and have the results formatted
and sent to one (or more) mail addresses. You can specify the name
of the mail server, subject of the mail and (if you use the right
fields), the mail will appear at your chosen account with the correct
user name and email address (so that you can reply to it).
Example - this
is a simple web form
<FORM METHOD="POST"
ACTION="/scripts/mailto.asp" >
<INPUT TYPE="hidden" NAME="to" VALUE="address@server.com">
<INPUT TYPE="hidden" NAME="server" VALUE="mail.lonetree.com">
<INPUT TYPE="hidden" NAME="subject" VALUE="Form
results">
<INPUT TYPE="hidden" NAME="success" VALUE="http://www.yourdomain.com/result.htm">
<B>Your details:</B>
Name: <INPUT NAME="uname" SIZE=30>
Position: <INPUT NAME="title" SIZE=30>
Company Name: <INPUT NAME="company" SIZE=40>
E-Mail: <INPUT NAME="email" SIZE=30>
Press <INPUT
TYPE="submit" VALUE="Submit"> and your request
will be processed or <INPUT TYPE="reset" VALUE="Clear">
to start again.
We aim to respond within 24 hours.
When the user
presses the SUBMIT button, the information is sent to the WWW server
which calls /scripts/mailto.asp. MAILTO will read the details sent
and format a message which looks something like:
From: My Name
<other@company.com>
To: <address@server.com>
Subject: Form results
Date: Thu, 22 Jun 95 13:22:28 GMT+0000
The following form contents were entered on 22nd Jun 95
Date = 22 Jun 95 13:22:26
subject = Form results
uname = My Name
title = Network Administrator
company = Elephants Inc
email = other@company.com
Generally, the
sendto hidden field, is your address, or the address that you wish
the form results sent to.
The
Fields
This is a list
of fields that the MAILTO will automatically use. All other fields
will be decoded and placed into the mail message.
| to |
The
address of the recipient of the email message. This field
is mandatory. |
| cc |
A comma
separated list of other recipients of the form contents. (optional) |
| server |
Name
of mail server to send the mail to. Lonetree.Com Customers
can use mail.lonetree.com or dax.lonetree.com for the server
name. |
| subject |
The subject
of the mail message. (optional) |
| success |
The full
URL for the next page to display. (optional) |
| error |
The
full URL for the next page to display if an error occurred.
(optional) |
| uname |
Name
of the user (which will be inserted into the from clause to
aid filing). (optional) |
| email |
The email
address of the person filling the form. The contents of this
field will also be placed into the From: clause of the mail
message. When you receive this message, you will be able to
type "Reply" and reply to the person who filled
the form. This field is mandatory. |
Company and product names are registered trademarks of individual
companies and are respectfully acknowledged.
|