the new frame version of this homepage is at this link

CookMail HomePage


If you do not have an account on AG.arizona.edu, please install your own cookmail!

CookMail Download

The current version of CookMail is 2.13d for Windows and 2.14c for Unix. Send me an email if you have problems downloading these files (or if the package is missing some critical components). All versions and necessary files of CookMail are also available for download in http://ag.arizona.edu/~heng/cookmail/archive/
Unix:
(http://ag.arizona.edu/~heng/cookmail/archive/cookmail-2.14c.tar.Z)

NT (also Windows 95):
(http://ag.arizona.edu/~heng/cookmail/archive/cookmail-2.13d.zip)

Alpha NT (This zip file contains blat15i.zip for alpha, cookblat.exe and cookmail.exe regular version for alpha. Thanks to Mandich, Lou lou.mandich@iga.com for compiling this archive. The default temp directory is d:\temp.):
(http://ag.arizona.edu/~heng/cookmail/archive/cookmail-2.13b-AlphaNT.zip)

OS/2 (This zip file contains cookmail.exe, source code and readme.os2) Thanks to Brian Carr bcarr@Basit.COM for modifying and compiling this archive. Please read readme.os2 for detailed information:
(http://ag.arizona.edu/~heng/cookmail/archive/cookmail-2-OS2.zip)

Starting from version 2.13c, there are four versions of CookMail for Windows NT. The HTTP/1.0 200 OK header is required by some web servers.
cookmail.exeregular version which sends HTTP/1.0 200 OK header before the CGI header
cookmail-lite.exelite version sends the HTTP/1.0 200 OK header
cook.exeregular version sends CGI header only
cook-lite.exelite version sends CGI header only

If you have any questions or comments, please send them to me. You may also want to subscribe to the cookmail-l list for the latest update on CookMail.
Your email address:
Just your email address please. It would automatically add your address to a majordomo list and I won't have to do the manual subscription. Please send me an email if you happened to change the address. This list will only be used for cookmail updates. You may wish to check the HTML source to see how easy it is to use CookMail for mailing list subscriptions.

HTML Examples


Introduction

CookMail is a powerful HTML email form CGI handler. Without doing any programming, HTML writers (professional and novice) can create any email forms utiltizing the following brief but not all key features of CookMail: If you do not think that any one of the above statements is true, send me your argument and proof.

CookMail Installation

Here is a checklist you can print out. UNIX
Windows NT/9x

CookMail Basics

In your HTML form, include the following in the form tag:
	<FORM METHOD=POST ACTION=/cgi-bin/cookmail>
where /cgi-bin/ is the directory name CookMail installed in. Note, the above only works if your CookMail program is on Unix. On NT, you will need to use:
	<FORM METHOD=POST ACTION=/cgi-bin/cookmail.exe>
To be able to go back to the page that spawned email form in the output, add the following after the form tag:
	<!--#exec cgi="/cgi-bin/cookmail" -->
*NOTE* Above will only work if your web server allows server-side execute. This is useful in determining where a visitor enter the form page from.
You will also need to specify the email recepient in a input field named TO:
	<INPUT TYPE=HIDDEN NAME=TO VALUE="cookmail@ag.arizona.edu">
Although you can incorperate the TO in other ways such as multiple selection, TO field is absolutely required. CookMail also have some other predefined input field names which should not be mis-used. Other than those, you can make up any names containing any characters except '='. Field names such as "What's is your nationality?" are very useful in default field name handling of CookMail.

Note:

CookMail is case sensitive to field names. Thus, SUBJECT is not the same as Subject or subject.

Examples: -> Use the Go Back link to come back to this page


Advanced Features

The power of CookMail lies in the feature that HTML authors have the complete control over the format of the email message and output should be.

To control the format of email messages, including the following tag within the form:

	<INPUT TYPE=HIDDEN NAME=FORM VALUE=/complete-path/email.form>
Similiarly, to control the output, include the following tag:
	<INPUT TYPE=HIDDEN NAME=SHOW VALUE=/complete-path/email.show>
The filenames don't have to be email.form and email.show. The format of SHOW and FORM files are the same as the normal HTML documents and email messages, respectively, except that cookmail recognizes ${field_name} and replaces them with corresponding field texts. For instance: ${TO} corresponds to the email address of the recipient. If there are quite a few field names and only some of them are included in the control files, the rest can be displayed using ${ETC}. ${ETC}, however, will not format the fields passed by httpd and the predefined input names.

Note:

Environmental variables passed to CGI scripts, such as HTTP_REFERER can also be recognized by cookmail. In this case, the format would be ${HTTP_REFERER}. Please consult www.w3.org for a complete list of available environmental variables to CGI scripts.

Tip:

You can create your SHOW files as an HTML file and then rename it to something else later. The name of the extension does not matter.

Examples: -> Use the Go Back link to come back to this page


Reference of Predefined Input Field Names

Beside the following predefined input field names, you can make up any other field names as long as it doesn't have a equal sign (=) in it.

Tip:

You can use CHECKBOX or RADIO buttons to assign the value of "ON".
Name Version Meaning/Value
Absolutely Required
TO 1.0 the email address of the recipient. -Must Have
Default Input Field Handling
NAME 1.0 the name of the email sender
EMAIL 1.0 the email address of the sender
SUBJECT 1.0 the email subject
MESSAGE 1.0 the main message body.
CC 2.1 carbon copy (Cc: ) email message back to viewer.
  • ON
    make a carbon copy email message
MIME 2.1 send email message with MIME support
  • ON
    send email message with MIME support
Configuration
EMPTYHANDLE 1.5 blank field handling. The following are the valid values and their meanings.
  • IGNORE
    ignore the field in default formating
  • NOIGNORE
    do not ignore the field in default formating
  • ERROR
    display error immediately
Default value is IGNORE.
MULTIPLE 1.6 manual concatenation of the strings of the same field across the form.
  • ON
    turn on the manual concatenation
  • OFF
    turn off the manual concatenation
*NOTE* Turn this field on only when necessary. Otherwise, results can be unexpected.
MULTIPLEMARK 1.5 string separates multiple selections
Default value is ', ' without quotes.

Advanced Features

Output format control files
REDIRECT 1.0 displaying another HTML document as the result
SHOW 1.0 result display control file
FORM 1.0 email format control file
CCFORM 2.1 carbon copy email format control file
EMPTY 1.5 blank field error control file
Value Generated by CookMail
ETC 1.0 indicating the rest of the unformated input fields
EMPTYERROR 1.5 indicating the last input field which is empty
Internal Use - Do Not Use Them
PREVENV only in
1.5x-1.6x
Abandoned in version 2 of CookMail

New Features

Version 2.12 Version 2.11 Version 2.1 Version 2.0 Version 1.6 Version 1.5 Version 1.0

Bug Fixes


Potential Problems and Their Fixes

  1. Regular versions of CookMail use "Location:" instead of "Content-type:" to display its output. Although this method gives CookMail some powerful features, such as running CGI scripts in the output, it also leaves a temperary file in the /tmp directory everytime cookmail runs. There should be a cron job periodically removing these temperary files (/tmp/owebm* on Unix and c:\temp\oweb*.* on Windows) if there hasn't been a similar one. Using CookMail Lite can avoid this trouble.
  2. Security in CookMail
    Previous versions of CookMail (before 2.14) have some flaws in security that allows hackers to download files that are readable by world. One of such files is /etc/passwd. Although this file does not actually contains any password information on most systems (even if it does, they are encrypted.), it does provide a list of usernames for hackers who attempt to break them. Malacious hackers could also execute some commands as the uid of HTTPD (never ever run HTTPD as root). If you downloaded CookMail before 11/30/99, please download it again. BTW, don't just look at CookMail alone. There may be tons of CGI programs on your web sites having the similar problem. I have been actively trying to fix all the potential security bugs founded.
  3. Additional minor bugs/warnings/problems are stated in cookmail.c.

    Be warned:
    Install and use CookMail at your own risk!


Registration & Copyright

CookMail is a freeware. You are encouraged to use and distribute it to anyone freely. Modifications of this software are allowed on the base that these modifications are not distributed. There is no registration required for this program, but I strongly suggest that you subscribe to the cookmail-l list for the lastest release/bug fix. If you like using CookMail, please send me a postcard. :)
	Heng Yuan
	2333 E. Eastland
	Tucson, AZ  85719
	U.S.A.

CookMail (c) Copyright 1996-1999 by Heng Yuan