Simple Email Form
he following example will send the information you enter in the fields to the Web Office email account.
FORM:
HTML:
<HTML>
<
BODY BGCOLOR="#FFFFFF">
<B>FORM:</B>
<
FORM METHOD="post" ACTION="http://www.umsl.edu/servlet/FormServlet">
<
input type="hidden" name="URLreturn" value="http://www.umsl.edu/computing/FormServlet/examples/thanks.html">
<
input type="hidden" name="SMTPreturn" value="/webstuff/htdocs/computing/FormServlet/examples/form1.tmplt">
<INPUT
TYPE="hidden" NAME="E_Mail" VALUE="Web_Office@umsl.edu">
<
INPUT TYPE="text" NAME="name" SIZE="30"> Your Name<BR>
<
INPUT TYPE="text" NAME="address" SIZE="30"> Campus Address<BR>
<
INPUT TYPE="text" NAME="from_address" SIZE="30"> Email Address<BR>
<
INPUT TYPE="text" NAME="phone" SIZE="30"> Phone Number<BR>
<
INPUT TYPE="submit" VALUE="submit">
<
INPUT TYPE="reset" VALUE="reset">
<
/FORM>
<
/BODY>
<
/HTML>
FILES REQUIRED:
EXPLANATION OF TAGS:
<HTML>
Basic HTML tag. Tells the browser that the tags are using HTML.
<BODY BGCOLOR="#FFFFFF">
Basic HTML tag. Starts the BODY of the page. Formats background color to WHITE.
<FONT FACE="Verdana, Tahoma, Helvetica, Arial" SIZE="-1">
Changes the FONT on the page to be one of these.
<FONT COLOR="#CC0000"><B>FORM:</B></FONT>
Changes the font color to UMSL red, and makes the "FORM:" bold.
<FORM METHOD="post" ACTION="http://www.umsl.edu/servlet/FormServlet">
Required element for UMSL forms. Tells form to use FormServlet to process form information.
<INPUT TYPE="hidden" NAME="E_Mail" VALUE="Web_Office@umsl.edu">
Required element for UMSL forms sending email. This tag specifies that the values are sent to the Web_Office email address when the form is submitted. CHANGE THIS TAG TO YOUR OWN EMAIL ADDRESS.
<input type="hidden" name="URLreturn" value="http://www.umsl.edu/computing/FormServlet/examples/thanks.html">
Required element for UMSL forms. This tag specifies the HTML file that will be returned when the form is successfully submitted. This can be any file - for example, you can have your form return to your homepage. By copying the tag exactly as it is above, you can use our generic "Thank You Page" for your form. See the link above in the FILES REQUIRED section for an example of this file.
<input type="hidden" name="SMTPreturn" value="/webstuff/htdocs/computing/FormServlet/examples/form1.tmplt">
Required element for UMSL forms. This tag points to a text file that will format the output of the form. With this function you can edit the email file that is sent with this form. See the link above in the FILES REQUIRED section for an example of this file. Please note that the values within the }}{{ brackets are named exactly as they are in the HTML above.
<INPUT TYPE="text" NAME="name" SIZE="30"> Your
Name<BR>
<
INPUT TYPE="text" NAME="address" SIZE="30"> Campus Address<BR>
These tags create the blank spaces in the form. The section on this site called "HTML Tags" will show you the different types of blanks you can use.
<INPUT TYPE="text" NAME="from_address" SIZE="30"> Email Address<BR>
Required element for UMSL forms. This tag specifies the address the email message will be from. This example uses this tag so that the user can enter their own email address in this space. When the output is sent in to the email message, it will appear that the email is coming from the address listed here.
<INPUT TYPE="text" NAME="phone" SIZE="30"> Phone Number<BR>
This tag creates the blank spaces in the form. The section on this site called "HTML Tags" will show you the different types of blanks you can use.
<INPUT TYPE="submit" VALUE="submit">
This tag creates the SUBMIT button. Clicking this button will send the form values to FormServlet, and return the message "Form Successfully Submitted" to the user. Whatever text is used as the VALUE will be what appears on the button.
<INPUT TYPE="reset" VALUE="reset">
This tag creates the RESET button. Clicking this button will clear all answers from the form. Whatever text is used as the VALUE will be what appears on the button.
</FORM>
This tag tells the browser that the form is done, and needs to be placed at the END of your form. No form variables AFTER this tag will work.
</BODY>
Basic HTML tag. This tag tells the browser that the BODY section of the page is closed.
</HTML>
Basic HTML tag. Tells the browser that the HTML is finished
