Mail-back Form
Using the Mail-Back Scripts
Rose-Hulman provides two scripts, which are available for public use. These scripts, known as the mailback scripts, simply send an e-mail to a given e-mail address containing the information that was put into the form. While simple, they can be useful in many ways.
The following is a list of the required field that need to be put into the form in order to properly use the mailback scripts. Some of the fields are to be entered as hidden form elements, as they are not to be inputted (or changed) by the user. The rest are usually one-line text boxes, wherein the user can input information.
| Name of Element | Type of Element | Description |
|---|---|---|
| mailitto | hidden | This is the e-mail address to which the information submitted will be sent. Most likely, this will be your own e-mail address. |
| subject | hidden or one-line text box | This will be the subject of the e-mail that is received (by you) every time the user submits something. You may prefer to have it as a hidden element, so that you can define the subject (and easily recognize when you get submissions from the web page in your mailbox). If you wish the user to be able to define the subjects, for whatever reason, you can set it up as a one-line text box, or even some other element. Note that this is a required field, so if you allow the user to fill it out, the user must have it filled out in order for the e-mail to be sent. |
| namefrom | one-line text box | This is the name of the person who is submitting the information. |
| mailfrom | one-line text box | This is the e-mail address of the person who is submitting the information. Note that there is no way of validating that the e-mail address entered is actually correct. |
The rest of these fields are optional. With one exception (noted below), you can use any of these you want, if any at all.
| Name of Element | Type of Element | Description |
|---|---|---|
| showreport | hidden | This field tells the script to give the user detailed information after the user has submitted the data. If you include this field, you can set it equal to anything you want (like "yes"). |
| returnurl | hidden | The value of this field is the URL to which the "returnmessage" and "returngraphic" (see below) will be linked. After the user has submitted the form, the user will be able to click on the "returnmessage" and/or "returngraphic" to to another page (defined by the value of this field). An example application of this field would for the user to be able to click to go back to your main page. |
| returnmessage | hidden | The value of this field is the message the user will receive once the form has been submitted, and which the user will be able to click to be taken elsewhere (see "returnurl" above). |
| returngraphic | hidden | The value of this field is a URL to a graphic that will be displayed before the "returnmessage" (see above). |
| sentmessage | hidden | The value of this field is the message the user will see after submitting the form. This field does not provide a ink for the user to click, so it can be used instead of the "returnmessage", "returngraphic", and "returnurl" fields above. |
Step by Step Instructions
These are step by step instructions for creating a page using MS Frontpage 2000 that uses the mailback script.
- Start with a new page.
- From the Insert menu choose Form and then Form. FrontPage will insert a new form into your document with a Submit and Reset button already added.
- Right-Click inside of the form area (marked by a dotted line) and select Form Properties. Select Send to other. Make sure Custom Script is selected from the list.
- Click on the Options button.
- In the Action field type http://www.rose-hulman.edu/cgi-bin/mailback.pl. Make sure that POST is selected from the drop-down menu. The Encoding Type field should be blank. Click OK.
- Click the Advanced button.
- You will need to add two hidden inputs so the script knows who to send the
information to and what subject to put on the email so you will easily
recognize when you get information sent to you via the form.
- First, who to mail it to: Click the Add button. In the name field put mailitto. In the value field put the email address where you would like the form sent (e.g. John.Smith@rose-hulman.edu). Click OK.
- Next, the subject: Click the Add button. In the name field put subject. In the value field put the subject you would like to appear on the emails you receive (e.g. Web Form). Click OK. Click OK. Click OK.
- You will need to have at least two elements on you form so that the script can
process the information. These are Name and Email Address.
- For the Name element:
- From the Insert menu select Form and then One-Line Text Box.
- Type Name on the page next to this box.
- Right click on the text box and select Form Field Properties
- In the name field type namefrom. Make sure that the password field is set to No. Click OK.
- For the Email Address element:
- From the Insert menu select Form and then One-Line Text Box.
- Type Email Address on the page next to this box.
- Right click on the text box and select Form Field Properties
- In the name field type mailfrom. It is often helpful to enter an initial value of @rose-hulman.edu. Make sure that the password field is set to No. Click OK. Click OK.
- For the Name element:
- If you want to make an anonymous feedback page:
- Right click in the form area (indicated by the dotted line) and select Form Properties. Click the Advanced button.
- Click the Add button. Enter mailfrom in the name field. Enter anonymous@rose-hulman.edu in the value field. Click OK.
- Click the Add button. Enter namefrom in the name field. Enter anonymous in the value field. Click OK. Click OK.
- You can now add any other elements so that users can send you information that you need. When you create a new element right click on the element and select Form Field Properties and enter appropriate text in the fields. In general, the name field will show up on the email as a heading under which any information the user provides will be shown.
