The Email Gateway form handler formats and emails data received from a web form. Common usage includes contact or feedback forms. Note that the often the easiest way to get email from your site visitors is simply to add a mailto link, e.g.
<a href="mailto:yourid@bsd.uchicago.edu">email me<a>.
To create a form that uses this program you do not need to do any programming; however, you do need to set it up according to the guidelines below so your form can communicate with our program.
The hidden form variable email-message-template points to an absolute URL pointing at a plain text file that determines how the user input is formatted in the email. The message template is merged with form input to create the email content. This allows you to add spacing, labels, etc. The template uses a simple variable substitution: if the program sees any form field names in the template it will replace that name with the actual user data from. The form field names are identified by placing the name inside brackets prefixed with a dollar sign: ${form_field_name}. For example, if your form has two input fields, with the name attributes set to "Name" and "Degree" you can create a message template that looks like this:
Name: ${Name}
Degree: ${Degree}
Save this template as a plain text file (i.e. do not use Word) on your website and set the email-message-template variable in your form. When Professor John Frink submits the form the email you get will looks like this:
Name: John Frink Degree: Ph.D.
Please note that the template system is case-sensitive and uses the name attribute (not the id) of any form field. You do not have to use all your fields or keep them in the same order as on the form itself.