- You have a web site hosted on a server other than web.mit.edu (for example, kb.mit.edu, wikis.mit.edu, 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.
You can find general information on cgiemail in the cgiemail user guide at http://web.mit.edu/wwwdev/cgiemail/user.html. Note that this user guide is not MIT specific.
There are the two cgi programs installed on http://web.mit.edu 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:
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.
You can see an example setup of a web form hosted on a different site (wikis.mit.edu) but submitting through cgiemail on web.mit.edu at the following location. The form is at the bottom of this wiki page:
You can look at the page's source and the wiki markup used to insert the HTML form at:
The email template referenced by the form is at:
(The AFS path is just /afs/athena.mit.edu/astaff/project/helpdesk/forms/llp-request.txt if you are looking at the file directly in AFS instead of through a web browser.)