Jeg har fået tilsendt en flere sider lang sag. Nedenstående er det, jeg vurderer der kan bruges.
MAILTO CGI Program
MAILTO.EXE 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).
The only required hidden fields are sendto and server. The sendto field is the e-mail address that the form results will be mailed to.
To call the mailto.exe program, your FORM ACTION line should be:
<FORM ACTION="
http://utils.webpartner.dk/cgi-bin/mailto.exe" METHOD="post">
The /scripts directory is an alias to the actual directory where mailto.exe program is stored. It is available from any directory you have created. Because /scripts is a common, aliased directory, be sure you don't create a directory by the same name within your web site area!
Fields & checking
There are two different types of fields for the MAILTO program. The first set specify what to do with the email message and the second specify what information to put into the message. All these details are written into "hidden" fields in the HTML Form - this allows the configuration to be in one place and means that the form user presented with a simple interface. Unless otherwise stated, all fields are optional.
Email Fields
The following fields specify what is done with the email message.
sendto
The address of the recipient of the email message. If this field is not present, no email message will be sent. This field is the one that is checked by the security checking discussed elsewhere. For example:
<INPUT TYPE="hidden" NAME="sendto"
VALUE="DanceMaster@net-shopper.co.uk">
cc
A comma separated list of other recipients of the form contents. For example:
<INPUT TYPE="hidden" NAME="cc"
VALUE="abc@company.com,efg@company.com">
server
Name of one or more mail servers to send the mail to. If more than one mail server is specified (as a comma separated list) then MAILTO will work though the list giving each mail server five seconds before moving on to the next. This must be a ANAME or CNAME of the server (that is, one you can ping) and if omitted the localhost will be used. For example the following definition will cause MAILTO to send all mail to the mail server called mail.company.com and then mail.another.com if the first is not available:
<INPUT TYPE="hidden" NAME="server"
VALUE="mail.company.com,mail.another.com">
subject
The subject of the mail message. If not specified, the value variable "HTTP_REFERER" will be used and if that is not provided by the WWW server, the default string "Completed WWW Form" will be used.