FormMail CGI Script

FormMail is a free CGI script which you will be able to install onto your account via the CGI Scripts page. The script takes the input of a form and changes it to an e-mail. This document tells you how to configure your HTML pages for use with FormMail.

The FormMail script is situated in your cgi-bin directory, reference the script in the action tag of your HTML form as shown below:

This code calls the pre installed script when the web page visitor clicks the ‘Submit’ button.

Just add fields to your form to produce the desired functions. Below is a list of form fields you will be able to use and how to implement them.

Field Description
recipient This form field allows you to specify where your form results will be mailed. Most likely you will want to configure this option as a hidden form field with a value equal to that of your email address.
subject The subject field allows you to specify the subject that you wish to appear in the email that is sent to you after the form has been filled out.
email This form field allows the user to specify their return email address. This will be put into the ‘from’ field of the message you receive. If you want to require an email address with valid syntax, add this field name to the ‘required’ field.
realname The realname form field will allow the user to input their real name. This field is useful for identification purposes and will also be put into the ‘from’ line of your message header.
redirect If you wish to redirect the user to a different URL, rather than having them see the default response to the fill-out form, you can use this hidden variable to send them to a pre-made HTML page.
required You can require certain fields in your form to be filled in before the user can successfully submit the form. Simply place all field names that you want to be mandatory into this field separated by commas. If the required fields are not filled in, the user will be notified of what they need to fill in, and a link back to the form they just submitted will be provided. To use a customised error page, see ‘missing_fields_redirect’.
missing_fields_redirect This form field allows you to specify a URL to which users will be redirected to if there are fields listed in the required form field that are not filled in. This allows you to customise the error page instead of displaying the default.

Any fields which you allow that are not listed above will be mailed to the recipient in the form of the email.