Simple
mailform
There are two ways for people to email your
company from your site. You can use a simple email link anywhere on your pages,
or you can create forms on your site that get sent to you via the HTML submit
button. Here is how to create a simple e-mail form. In order to use the mail
form, you need to insert the following tags in your html forms:
- Insert a Form tag that has the following properties:
<FORM
METHOD="post" ACTION="/script/mailform">
Make sure
you set the METHOD to POST.
- Insert a hidden value tag that has the name
"mailreceiver"
Make sure it is lower case and that there are no
spaces. The value for that hidden tag is the email adress you want the form
to be send to. For example, if you want the contents of the form to be sent
to food@ksofttech.com. you should put the following tag:
<INPUT
TYPE="hidden" NAME="mailreceiver"
VALUE="food@ksofttech.com">
- Insert a hidden value tag that has the name "required"
Make
sure it is lower case and that there are no spaces. The value for that
hidden tag is the required fields on your form. For example, if you want
users to fill out some fields before being able to submit the form, you
should put the following tag:
<INPUT TYPE="hidden"
NAME="required" VALUE="username,phone">
- Next set up a hidden value tag that has the Name "subject".
This is the subject you want to appear when the mail gets sent to you. Set
the Value of the tag to whatever subject you like, preferably a subject that
will tell you from which HTML page the form was sent from. For example, if
you wanted the subject of the mail to be "order for hosting", then
the tag will be:
<INPUT TYPE="hidden"
NAME="subject" VALUE="order for hosting">
NOTE:
This tag can be ommited if you have no need for it.
- Next specify the html file you want displayed once the user presses
submit. The Name for the tag needs to be "htmlfile" and the value
has to be the path to the file name to be displayed. The full absolute path
name and file name is required. Note that the file must be a standard html
file. For example, If you have a file under your main directory called
thanksfood.html, then the tag will be:
<INPUT TYPE="hidden"
NAME="htmlfile"
VALUE="http://www.ksofttech.com/thanksfood.html">
This is a sample mailform html page