AlpineWeb Design Home
Check Domain Name Availability
Customer Login | Contact Us | Mobile Users
Live Help
    Home > Support Home > Hosting > VPS > FreeBSD > Administration > vinstall > NMS FormMail

NMS 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.
  • 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.


image


DocumentationDocumentation Home
Help Desk
Knowledgebase

Business Services
PC Data Backup Support
Sugar CRM



Web Hosting
Getting Started Guides
Starter Hosting
Signature Hosting
Virtual Private Servers
  • FreeBSD VPS v2/3
  • Linux VPS
Managed Private Servers
  • FreeBSD MPS v2/3
  • Linux MPS





image
Authorized viaVerio Reseller         Authorize.net         Miva Certified Business Partner
Homepage | About Us | Privacy Policy | Rates & Fees | Contact Us | Sitemap

All contents © Copyright 1997-2010 AlpineWeb Design