Crusoe Communications
Mail Form Help
 

Receiving email with the results of a form.

Crusoe Communications has provided a convenient CGI script that will take the contents of a form and email it to a given address.  To use it, design the form as you normally would, with all the information you wish to collect (i.e. Name, Address, Telephone Number, etc.)  Then, add additional hidden fields as desired (see below table). You will also need to create a "Thank-You" page.

Here is a sample form that you can use as a template:

<FORM METHOD=GET ACTION=http://www.YOURDOMAIN.com/cgi-bin/form-validate.cgi>
  <INPUT TYPE=HIDDEN NAME=to VALUE="YOUR-EMAIL@YOURDOMAIN.com">
  <INPUT TYPE=HIDDEN NAME=formname VALUE="Form-Name Here">
  <INPUT TYPE=HIDDEN NAME=target VALUE="http://www.YOURDOMAIN.com/thanks.html">
  <INPUT TYPE=TEXT NAME=SAMPLE>
  <INPUT TYPE=SUBMIT>
</FORM>

This sample form would mail the user YOUR-EMAIL@YOURDOMAIN.com a form response of whatever was typed into the "SAMPLE" field.  There are other options that can be used as well, and they are detailed below.


Form-Mail options

Parameter Summary Detail Required?
to Your Email This parameter is where it will send the results of all the form entries. Yes
formname Name of Form This is simply a title of the form that will be placed in the subject of the email message to you. Yes
target Thank-You URL This is the URL of the Thank-You file that the user will be shown after a successful form Submission.  It must be a full URL including the http:// header. Yes
required Any fields that may be Required on your Form This field is a comma-delimited list of any entries that must be filled in for the form to be submitted.  For example, if you had the hidden required variable set to VALUE="Name,TelNum", then those two fields would have to be filled in before the form would be accepted without error. No
file File to mail to submitter. If this field exists, it will check this physical path for a plain text file to be mailed to the user specified by the email parameter.  If it doesn't exist, no action is taken. No
email Field name where user enters email Address This is the only non-hidden field listed here.  This field will set the from and reply-to fields of the form responses that are emailed to you. It is also used if you wish a file to be delivered to the user via the file parameter. This field is checked to see if the address uses the correct Email Format, but not if it is an actual address. If the email field is ommitted the form response from address is set to be the same as the to address. Only With file

Crusoe Communications, Inc. - 100 Route 36 East - West Long Branch, NJ  07764
888-5-CRUSOE    732-728-9800    FAX: 732-728-7044    sales@crusoe.net

Copyright\051 1996 - 2001 Crusoe Communications, Inc.
All rights reserved.