Access Keys:
Skip to content (Access Key - 0)

Web Publishing - CGIemail and Forms

CGIemail is best-suited for simple comment and feedback forms. It is no longer recommended for registration pages, surveys, or other applications where the data and user responses must be exported into programs such as Excel or FileMaker. For those use cases, we recommend external providers, such as Google Docs.

Google Docs , a free service available from MIT Google Apps , lets you design a web form whose responses are automatically saved in a Google Doc Spreadsheet, which can then be exported to various other formats, including Excel and CSV. All the features of CGIemail forms, such as required fields, are available in Google Docs.

Because CGI scripts are a potential security risk, maintainers do not allow the MIT community to invoke scripts through its web interface. The only exception is CGIemail, which will collect input from an HTML form and email a specified email address. For advanced users the cgiemail home page is great resource for finding out more about the cgiemail script in use on the MIT servers.

The following perl scripts are helpful tools that can help you in the setup phase as well as the data collection phase if you have access to Athena. is a perl script that will take an html form page and generate the text file necessary to work with cgiemail. To use translateform, simply connect securely to athena, and enter the two following commands, editing the two file names in the second command appropriately: add cwis translateform foo.html bar.txt
Foo.html refers to your html file which contains the form and bar.txt is the filename you've designated for the text file that will list the fields from the form in the emails that get generated from the form. It is important to note that translateform currently does not prompt for recipient (that's you) email addresses, so these will need to be added by hand in the resulting text file before it can be used by cgiemail.

Windows users can use Outlook; Mac users can use Applemail. Once you have collected the email responses to your web page form, you may want to convert them into a text file which is properly formatted for easy import into a database like Filemaker Pro.

  1. To use you must first get a copy of the script. To do this, connect securely to athena, navigate to your desired directory, and enter the following command, on a single line, separated by spaces: add cwis; cp /mit/cwis/process/ This will put a copy of the script in whatever directory you are currently located.
  2. Upload the messages as a single text document where you have copied process-comments.
  3. At the athena prompt, type: file.txt. Substitute for file.txt whatever you have named the uploaded file of email messages.
  4. The script will generate a tab-delimited text file named process.out. Download process.out in aFormscii format to your local computer.
  5. Import process.out into your database, mapping your fields appropriately.

IS&T Contributions

Documentation and information provided by IS&T staff members

Last Modified:

February 25, 2016

Get Help

Request help
from the Help Desk
Report a security incident
to the Security Team
c-web-publishing c-web-publishing Delete
cgiemail cgiemail Delete
cgiemail2 cgiemail2 Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
This product/service is:
Easy to use
Difficult to use

This article is:
Adaptavist Theme Builder (4.2.3) Powered by Atlassian Confluence 3.5.13, the Enterprise Wiki