When a visitor visits a web browser that has the HTML form that he wishes to use and submit to the owner of the website any information he fills that might be of help to the owner, to ask questions, or even to deliver his opinion, he fills the form and submit the information. The web browser sends the submitted information to web server which processes the data using the form processor script.
One uses HTML to code the form. This code uses tags that are used to develop a web site form and then input elements. An example of a web form using HTML is as shown below.
<form action= “ cgi-bin / formmail.pl” method= “post”>
Name : < input type= “text” name= “name” value= “” size= “25” maxlength = “50”/>
Email : <input type= “text” name= “name” value= “” size= “25” maxlength = “50”/>
<input type= “submit” name= “submit” value= “sign me up!”/>
This type of HTML code creates a form that contains a section for the name of the visitor, his or her email address and a section of a place where he will be signed up.
When making a form, one uses input validations which are meant to help the web visitors submit the right information. These input validations are often written in a language that is client-side scripting such as Java Script. Java script is a language that run in the visitor’s web browsers and provide fast feedback. The HTML code just gives a form that has name, email, and message. By using the validation inputs one understands what he has to do. For example in field name, there can be validations such as [please insert your name] in email field, the input validation can be [please provide your email address] while in message field one is requested to fill his message. Then there is a submit button below the message field. It is optional to use the java script input validation. Though it is optional, it is recommended to use these validations since they make the website more users friendly.
When you do submission of web form, the web browser finds the action attribute from the tag; <form> tag. For example, the action attribute from the above example do point to a script that is located at “/ cgi-bin / formmail.pl”. The web browser then does send the submissions of the form to the script that is mentioned in the action attribute. Server scripts can be written in different languages depending on what language the user browser understands. Example of languages that are used to write these server side scripts includes; Perl, PHP or ASP.
Though there is this form, one has to understand that there is no form that can directly make any submission to an email. If this would be the case, there would be malicious hackers who can exploit the information and collect the email address of the visitors of the web. These hackers can spam the visitors address. In order to make protection to the web users, there is no any client side language that is capable of sending email without user interventions.
Since there is no any feature in HTML language to send email directly. But there have come an alternative to this though it is not yet proven. This is done by using the “mailto” method. This method is not very compatible with many browsers available and is not user friendly too. The following is an example of “mailto” method.
<form method= “post” action= “mailto:email@example.com”>
For the “mailto’’ method to work you have to create an input field from your form. You have to use “input” tag to build each section. Inside this tag, you have to designate type which is equal to “text”. This is where one will capture the name, email and details of the person who sends the email. You have to give each field a specific name using an attribute “name”. You can designate the length of each field by using “size” attribute so as to control the appearance of the input field on the website form. For example, you may write:
<input type= “text” name= “your email” size= “13”>
The only right method to make the HTML form to submit to ones email address is by using a form mailing script. This form mail script runs in web servers. This form mail script collects data from the form, converts it to an email and then sends this email to the address it is sent to. For example, if you have a wordpress blog, you can use certain wordpress plugins to make a wordpress email form. Another alternative is to make use of a PHP email form generator
Though there are forms in HTML that are used to fill some information that are sent to email, one should understand that there is no any feature in HTML that can send the form submission directly to any email address. The only way to send is by using mailto but it is not yet well proved.
The main disadvantage of “mailto” method is that it is not highly possible to make any control of the formatting of the form data. That is one cannot control the layout of data he has sent