FormMail

FormMail is a web script that takes information entered in a web form, reformats it and sends it via email or saves it to a file (or both). FormMail is available on Tigger and can be used for contact forms and surveys. Using FormMail requires knowledge of HTML to create the form and FormMail syntax to create the configuration file. Both must be uploaded to Tigger.

The University of Illinois WebTools suite is an alternative to FormMail and does not require knowledge of HTML. 

Basic configuration

  1. Create the form. Ensure that the form uses valid HTML and that form elements are accessible. This tutorial will use ​myform.html as the file name of the form. A very basic form file may look like:
    <html>
    <head>
      <title>My Form</title>
    </head>
    <body>
      <form name="myform" method="post" action="">
        <label for="myname">Your name</label>
        <input name="myname" id="myname" type="text" />
        <input type="submit" value="Submit" />
      </form>
    </body>
    </html>

    Note that the action​ attribute of the <form> tag is left blank for now. Upload the form to Tigger.

  2. Create the configuration file. The name and file extension of the configuration file can be arbitrary. This tutorial will use myform.sgml as the filename of the configuration file. The most basic configuration file may look like this:
    <!doctype form system 'FormMail-3.0.dtd'>
    <form name="myform"> 
    </form>
    

    Upload the file to Tigger. The form file and the configuration file don't have to be in the same directory, although it might be convenient to keep them together.

  3. Once the configuration file is uploaded to Tigger, update the <form> tag in the form file to include the location of the configuration file. The location will depend on where you upload the configuration file. If you upload the configuration file to your public_html​ directory and your NetID is ​adabyron, the action attribute will be:
    <form name="myform" method="post" action="http://www.uic.edu/htbin/cgiwrap/bin/formmail/FormMail/~adabyron/myform.sgml">

    If you upload the form to a non-personal directory on Tigger (for example: /​depts/mydept/), the action attribute will look similar to:

    <form name="myform" method="post" action="http://www.uic.edu/htbin/cgiwrap/bin/formmail/FormMail/depts/mydept/myform.sgml">

    On Icarus, replace ​www​ with ​www2​ in the action attribute.

  4. Upon submitting the form, this basic configuration will send an email with the contents of the form to the owner of the configuration file.

Customization

To customize the email, require authentication or save the submissions to a file additional parameters will need to be added to the configuration file using FormMail syntax.

Last updated: 

September 21, 2016