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

Using cgiemail on to create an email form hosted on a different site


  • You have a web site hosted on a server other than (for example,,, a Drupal site, etc.)
  • You need a web form that sends email but do not want to install and manage an email agent on your server


As long as you can insert an HTML form on one of your pages, you can call MIT's version of cgiemail, a script that processes your web form submission and sends email, from a form hosted on your site.

0. General information on cgiemail

You can find general information on cgiemail in the cgiemail user guide at Note that this user guide is not MIT specific.

1. Critical MIT-specific info

There are the two cgi programs installed on that you can use in your form tag's "action=" parameter:


The first is the actual cgiemail script. The second is a version that will allow you to test your setup without actually sending mail. It will display the mail it would have sent, without sending it. So you'll want to test with cgiecho while you are developing your form, then replace it with cgiemail when you're ready to send real email.

An full action parameter will look something like this:

  • action=""

where the part after "cgiemail" is the full path to an email template file you need to create in AFS, MIT's shared file system.

2. Examples

a. Example form using this technique

You can see an example setup of a web form hosted on a different site ( but submitting through cgiemail on at the following location. The form is at the bottom of this wiki page:

b. Look at wiki markup

You can look at the page's source and the wiki markup used to insert the HTML form at:

c. Examine the email template

The email template referenced by the form is at:

(The AFS path is just /afs/ if you are looking at the file directly in AFS instead of through a web browser.)

See also

IS&T Contributions

Documentation and information provided by IS&T staff members

Last Modified:

August 20, 2014

Get Help

Request help
from the Help Desk
Report a security incident
to the Security Team
c-web-publishing c-web-publishing 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