How to do form mail


This is a demonstration of using an HTML form to simply submit the information in the form to a specific user using form "mailto" action. The use of HTML forms "mailto" action has superceded use of the "formmail" cgi program formerly maintained by Computing Services.

What follows in fixed font is actual HTML code that will do this. You should be able to copy and paste the rest of this document, up to the next horizontal line, into whatever editor you are using to do your HTML compostion, make a few modifications to customize it for own use, and boom! your're off!

The elements that start with angle brackets followed by the exclamation sign are HTML comments. Read them for an explanation of what's going on. You will need some familiarity with constructing HTML forms to do more advanced types of Web forms layout.


<p>This is my experimental mailto form. Please enter your information in the areas provided below. <br> Be sure to fill out all applicable fields. <hr size=3 NOSHADE> <!--This HTML line is the guts of the FORM MAILTO tag --> <!--note the "mailto" tag as the action item, and --> <!--the optional specification of a subject--> <!--What this does is send whoever is specified in the "mailto" tag the name of each input item (input vairable name)followed by its value--> <!-- Replace WEBHELPER@CSUCHICO.EDU with your own e-mail address--> <FORM METHOD = POST ENCTYPE = "text/plain" ACTION = "mailto:WEBHELPER@CSUCHICO.EDU?subject=Comments from FORMMAIL sample"> <!-- ANY Input fields may be placed below --> <!-- The following are some examples --> <!--An INPUT form field is one type of form input field that can be defined on a Web form --> <INPUT name="NAME" size=40>Your Name<p> <INPUT name="EMAIL" size=40>Your E-mail Address<p> <INPUT name="PHONE" size=40>Your Phone Number<p> <INPUT name="ADDRESS" size=40>Your Mailing Address<p> <INPUT type=password name="NONECHO" size=40>Non-echo Info. Field<p> <INPUT name="MISC" size=40>Misc. Info. Field<p> <INPUT type=hidden name="HIDDEN" size=40><p> <!--A textarea is another type of input field that draws a big box allowing people to make comments or input a large amount of text data--> <p>Comments:<p> <TEXTAREA NAME="content" ROWS=10 COLS=60></TEXTAREA> <p> <!--This next item, an INPUT type of "submit" defines a button to be used to submit information--> Click <INPUT TYPE="submit" VALUE="SEND"> to submit your message. <!--This next item, an INPUT type of "reset" defines another button that allows the information in the form to be cleared, i.e. not submitted. At this point the information can be re-entered if desired--> Click <INPUT TYPE="reset" VALUE="CLEAR"> to clear your message and start over. </form>
That's all folks!

This document maintained by WEBHELPER