FormMail Demo

  This document demonstrates the use of the FormMail.pl CGI script. Please note that while we're unable to provide detailed support for this script (for reasons such as bugs, compatibility issues, potential vulnerabilities, etc), we are able to provide this basic tutorial on setup for HTML forms on your Hurricane Electric hosted site. If you have any questions regarding the script itself, please see the NMS Support Page.

The Form

Fill out the following form:

Color Shoe's Electronic Catalog

Email Address: 

Real Name:

Shoe Size:

  • 2101 - Blue Shoes
  • 2102 - Red Shoes
  • 2103 - Yellow Shoes
  • 2104 - Green Shoes
  • 2105 - Black Shoes

(Don't worry, this will only show you what an email message would look like.)


Ingredients

  • The script.

    You can download the NMS FormMail script from the NMS download page. Be sure to grab the 'compat' version.

    Prior to putting the script on your site, you'll need to configure it. Configuration is fairly simple, as it takes place entirely in the second 'page' of the script.

    Once you've downloaded the .zip file from the above link, open it up, then open FormMail.pl inside of your favorite text editor (we recommend 'notepad.exe' in Windows). Scroll down until you see the following:

    BEGIN
    {
      $DEBUGGING         = 1;
    

    This is the beginning of the section you'll be editting. Here, you will edit the following lines:

      $max_recipients    = 1;
      $mailprog          = '/usr/sbin/sendmail -oi -t';
      $postmaster        = 'you@example.com';
      @referers          = qw(example.com www.example.com);
      @allow_mail_to     = qw(you@example.com); 
    
      $style             = '';
    

    You'll need to replace 'you@example.com' with your email address, and 'www.example.com' with your Hurricane Electric hosted website. The small change in '$mailprog' is important, so make sure you don't skip over it.

  • The form.

    This is your standard HTML form with an ACTION which invokes the FormMail.pl CGI script.


Differences from cgiemail

  Many of our long time customers will remember cgiemail, and wonder where it has gone. It's still exists for our legacy users, but we're recommending away from cgiemail, as it hasn't been supported for a very long time, and vulnerabilities do exist.

Required form entries are now designated inside a small array, as listed in the 'form.txt' link above.

'From' addresses no long require lengthy procmail recipies! You can now simply use 'email' and 'realname' in the form, and the script will take care of the rest.

For information on what all the names and fields do, please see the README file inside the FormMail .zip file.


Hurricane Electric
760 Mission Court
Fremont, CA 94539
FAQ Index   --   Tutorial Index
Copyright © 1994 - 2007 Hurricane Electric.
All Rights Reserved.
Voice 510.580.4100
Fax 510.580.4151
Comments? info@he.net