AlpineWeb Home
Search: For:   ~ Advanced Search  
  Support Home     Documentation     Knowledgebase     Help Desk     Blog 
Support Home > VPS2 > Administration > vinstall > NMS FormMail Monday, October 06, 2008

NMS FormMail CGI 3.14c1


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.
  • Find the @referers line and replace the information inside the parentheses with your own server's domain name(s) and IP address. You can leave the localhost value.
  • In the @allow_mail_to line, remove the original E-mail addresses and put either the domain, or a full E-mail address for every account that should be allowed to recieve E-mail messages from this form. For security reasons, unless you have a large number of E-mail accounts at a single domain, it is better to list the full address for each recipient.
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):
  • recipient = specifies who mail is sent to
The recipient in the form must match one of the E-mail addresses in your @allow_mail_to line in the script.

Other optional fields can also be used to enhance the operation of FormMail for you site, for example:
  • subject = specify the subject included in e-mail sent back to you
  • e-mail = allow the user to specify a return e-mail address
  • realname = allow the user to input their real name
  • redirect = URL of page to redirect to instead of echoing form input
  • required = list of field names that are required input (comma delimited)
Several other fields are supported. See the FormMail.readme and the EXAMPLES.txt files 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,e-mail,phone">
Please Enter Your Name:<br>
<input name="realname" size="40">
<p>
Please Enter Your E-mail Address:<br>
<input name="e-mail" 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.



Technical Support
° Getting Started Guides
  FreeBSD
° Basic Hosting Help
° Signature Hosting Help
° VPS v1 Help
° VPS v2/3 Help
° MPS v2/3 Help
  Linux
° VPS v3 Help
° MPS v3 Help
  SaaS
° Sugar CRM
  DNS
° Domain Name Service
° Domain Registration
° Help Desk
° Knowledgebase
° Support Policies
° Disclaimer

° AlpineWeb Home
° Compare Hosting Plans
° Network Topology

° Rates & Fees
° Order Center




  Home | Site Map | Customer Backroom Copyright  ©  1997-2008  AlpineWeb Design