FormMail CGI

FormMail is a CGI program designed to generate e-mail based on the input from an HTML form.

Installation

To install the FormMail CGI on your Virtual Private Server, connect to your server via SSH, su to root, and do the following:

# vinstall formmail

This command installs three files, FormMail.pl, FormMail.examples and FormMail.readme, into your /www/cgi-bin directory. The examples and readme files contain various information and examples on using FormMail.

You will need to set up the script to use your account information. Open the file FormMail.pl and modify the following lines in the USER CONFIGURATION SECTION.

Once you have modified these two fields, save the file.

Usage

Create a form that you would like the contents mailed to some address. The form should include the following field (at the very least):

Other optional fields can also be used to enhance the operation of FormMail for you site, for example:

Several other fields are supported. See the FormMail.readme file for a complete presentation of the supported fields.

For example, the HTML source for your form may look like this:

<form method="POST" action="/cgi-bin/formmail.pl">
<input type="hidden" name="recipient" 
       value="order@yourdomain.com">
<input type="hidden" name="subject" 
       value="Order Request">
<input type="hidden" name="required" 
       value="realname,email,phone">
Please Enter Your Name:<br>
<input name="realname" size="40">
<p>
Please Enter Your Email Address:<br>
<input name="email" size="40">
<p>
Please Enter Your Phone Number:<br>
<input name="phone" size="40">
<p>
.
.
.
<input type="submit" value="Submit">
<input type="reset" value="Reset">
</form>

Once your form is complete, you should be able to send E-mail messages using it.