Mail Form Handler - mail_form.pl
[tim stevenson home]

mail form handler:
[the script]
[mod history]
[help file]
[example form]


related links:

scripts:
[cgi resource index]
[hotscripts.com]
[the perl archive]
[best-of-web: cgi]

tutorials:
[cgi tutorials: beginner]
[perl/cgi tutorials]
[webmonkey perl/cgi]

Best Viewed with Firefox!
Get Firefox!

Mail Form Handler (mail_form.pl)

what's new

I am back on employees.org, so the working example form is back! Enjoy!

Version 4.1 for Unix is now available (09/16/2003)!! This version fixes a minor bug with the anti-spam email address feature. Other than that, it is the same as version 4.0, which integrates several really nice improvements, requested by YOU!, the user-base, that I have been meaning to add for some time. Please refer to the modification history for details.

I will try to release 4.1w for Windows 2000 Server soon, but don't hold your breath. Use 3.2w for now.

Version 4.1 for Unix is now available (09/16/2003)!! This version fixes a minor bug with the anti-spam email address feature. Other than that, it is the same as version 4.0, which integrates several really nice improvements, requested by YOU!, the user-base, that I have been meaning to add for some time. Please refer to the modification history for details.

I will try to release 4.1w for Windows 2000 Server soon, but don't hold your breath. Use 3.2w for now.

overview

The Mail Form Handler script, by Tim Stevenson, is freeware and may be distributed freely as long as all credits and comments remain intact.

To save the script to your local disk, right-click the
appropriate link below and select "Save Link As...":
Mail Form Handler script for Unix Servers (version 4.1)
Mail Form Handler script for Windows 2000 IIS Servers (version 3.2w)

See the help page for details on how and where to install the script.

The Mail Form Handler (mail_form.pl) is a generic CGI script designed to email input from most any HTML form to a specified user or users. All your forms can point to a single instance of the script because the script can support any number of HTML forms while providing customizable output for each.

The basic requirements for using the Mail Form Handler are:

  • An HTTP server with the following:
    • Perl installation
    • Capable of executing CGI scripts
    • Capable of generating email using sendmail (or the equivalent)
  • An HTML form
  • Some HTML coding ability. A little perl scripting skill doesn't hurt, but in most cases is not necessary . . .

For more details on server requirements, see the help page.

security advisories

The script relies on sendmail or a similar executable on your server. There are some important sendmail security advisories you should probably be aware of.

For the latest info, visit the various sendmail home pages:

modification history

Here's the feature/modification list for the script.

help

Detailed help is available, including server requirements and explanations of the features and special form fields the script supports. In addition, the script has a basic help file built-in that shows some fundamental information and the default values for each special form field for that instance of the script (in case you modify the defaults within the script).

example form

I have set up an example implementation of mail_form.pl that utilizes some of its key functionality.

  • Please don't enter a bunch of gibberish, thanks!
  • You will be Cc'd on the generated email (provided you enter your real email address), so if you want to test if it works, enter your real address.
  • View source on the form to see how to code the HTML (pay particular attention to the <input type="hidden"> form elements).
  • Submit a blank form to see how required fields are handled.

Check it out.

users

I'd like to hear from you if you are using the script. Sign the guestbook and include the URL of your form or just drop me an email at tstevens at employees.org.

Coming from the CGI resource index? Rate the script!
Coming from hotscripts.com? Rate or review the script!
Thanks!

disclaimer

The Mail Form Handler is provided as-is. I shall not be held responsible for its performance, nor the manner of its use by another party, in any respect.

In addition, use of this script is subject to the Privacy & Usage Policy.


Visitor Number:

[Reset December 19, 2000]

Updated: 06/09/2005
Tim Stevenson, tstevens-at-employees.org
Privacy & Usage Policy