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:
  1. Insert a Form tag that has the following properties:
    <FORM METHOD="post" ACTION="/script/mailform">
    Make sure you set the METHOD to POST.

  2. 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">

  3. 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">

  4. 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.

  5. 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

Please enter your name:

Please enter your phone:


What Would you like?



And this is the source code that you can copy & paste

<FORM METHOD="post" ACTION="/script/mailform">
<INPUT TYPE="hidden" NAME="mailreceiver" VALUE="food@ksofttech.com">
<INPUT TYPE="hidden" NAME="required" VALUE="username,phone">
<INPUT TYPE="hidden" NAME="subject" VALUE="Just testing the members' e-mail form">
<INPUT TYPE="hidden" NAME="htmlfile" Value="http://www.ksofttech.com/thanksfood.html">
<P>
Please enter your name:<BR>
<INPUT Type="text" Size=32 Name="username"><BR>
Please enter your phone:<BR>
<INPUT Type="text" Size=32 Name="phone"><BR>
What would you like?<BR>
<SELECT Name="Would Like: "><BR>
<OPTION>Food
<OPTION>Drink
<OPTION>Do not know
</SELECT>
<BR>
<INPUT Type=submit Value="Send Mail">
</FORM>