MailForm Version 1.2.2, 1/2000
HTML form to e-mail gateway CGI Written by Kelly Yancey

MailForm 1.2 Introduction

MailForm 1.2 Configuration Fields


What's New:
MailForm 1.2.1 is simply a maintenance update to address 2 minor bugs that have surfaced since it's release in December of 1997.

MailForm 1.2 introduces many improvements in regards to both speed and flexibility. The entire CGI query parsing routines have been rewritten from scratch, keeping in mind the need for speed. Not only can MailForm 1.2 now parse the CGI query data blazingly fast, the new routines make MailForm 1.2 more flexible. Unlike prior releases and many other HTML form to e-mail gateways, MailForm 1.2 can handle CGI requests of unlimited size (up to the amount of available memory). In addition, MailForm 1.2 now properly handles requests with multiple form fields with the same name (as is with HTML checkboxes); form fields with the same name are formatted as a group in the e-mail that is generated.

In addition, MailForm 1.2 further improves functionality over prior versions by allowing multiple e-mail recipients, multiple cookies to be sent with the HTML response generated when the user submits a form, and multiple mail headers to be injected into the generated e-mail.

For more information about this and prior releases, please visit the MailForm Revision History page.

History:
MailForm is a CGI which takes a form from the World Wide Web and sends the values entered via e-mail to a given recipient. MailForm is derived from Matthew Wright's FormMail PERL script of the same function. MailForm, however is written in C in an effort to make the CGI execute faster, thereby putting less strain on the web server hosting MailForm. To execute a PERL script, the PERL program must load, parse and compile the script, and then execute it. It has to do that each time a request is made to execute the program. Having worked as the system administrator at several Internet Service Providers, I understand the value of clock cycles on busy web servers. So to reduce the amount of overhead, I rewrote Matt Wright's popular FormMail PERL script in C with the intention to elimitate the extra overhead required to run a PERL script, leaving more time for our web server to handle client requests. I choose FormMail since it is a common script that many web sites use, so optimizing it would be of great benefit. MailForm, the C version of Matt Wright's FormMail CGI, is written as best as possible to be portable. It is written in ANSI C (I recommend compiling using gcc) and only uses POSIX-compliant system calls. I have tested it on every system I can get my hands on (which so far has only included BSDI 2.0, BSDI 2.1, and every version of FreeBSD 2.1.6 through 2.2.5). It is written for Unix, specifically BSD flavors of Unix. It will not work as written on any Windows platform, OS/2, or Macintosh. If you want these, you will have to use Matt's FormMail PERL CGI for the time being. One thing PERL has in it's favor in portability.

Features:
MailForm can provide simple logging of requests made to it, by default it uses the syslog user/info facility. You can change the syslog facility used to log requests by setting the -DLOG_FACILITY option in the Makefile. Also, if your system does not run syslog for some reason, you can hame MailForm log directly to file by removing the -DSYSLOG option from the Makefile. Currently MailForm is hard-coded to write to /var/log/mailform.log when not using syslog. If you don't care about logging, logging can be disabled entirely by specifying the -DNOLOG option in the Makefile. All these options are described fully in the Makefile. MailForm also can be built with support for Open Market's FastCGI interface. I *highly* recommend including FastCGI support if your web server also supports FastCGI (most web servers can be built to include FastCGI support, oddly, few are). For more information about MailForm's FastCGI support, please refer to the README.FastCGI included in the distribution.

Contacting the Author:
MailForm is written and maintained by Kelly Yancey.
I can be e-mailed at kbyanc@posi.net
Updates can be found at http://www.posi.net/software/mailform
Please read the copyright before using MailForm.

This is very old code for me now (the initial development was done in 1996) and I am no longer interested in maintaining this code. As it stands now, I believe it to be reliable (many people have been using it for years without notifying me of any outstanding bugs). I have no intentions to add any more features to the code. What is there now is all there will be as far as I am concerned. However, I have changed the license to a BSD-style license, so you are free to take the code and do whatever you like with it.

As such, please do not e-mail me with any questions regarding MailForm or its usage.

Availability

The latest version of MailForm can be downloaded as MailForm1.2.2.tar.gz.

MailForm 1.1 is still available and can be downloaded as MailForm1.1.tar.gz.

Please read the copyright before using MailForm.


Compatibility Notes

I am aware of MailForm compiling and running on the following platforms:

  • BSDI 2.x
  • FreeBSD 2.1.6 or higher
  • NetBSD 1.4 or higher
  • Redhat Linux 5.2 or higher (using pmake)
  • Solaris 2.6 or higher
Examples

Try it out for yourself. Here is an example form you can fill out and it will mail the results to you so you can see for yourself what they look like.

Of course, ordinarilly you would not send the results to the person filling out the form, but this is here for demonstration purposes.




Rated with RSACi Designed with style Valid HTML 4.0!

Copyright © Kelly Yancey, 1997, 1998