Home
Download the latest Formmail script
Setting up the Formmail script
Upload the Formmail script
Chmod the Formmail script
Setting up the HTML form
Example Form

Setting up the Form

Your form that will be sent as an email to you needs to point at this script, and the action method must be POST or GET in capital letters.

Below is a list of form fields you can use and how to implement them.

Necessary Form Fields

There is only one form field that you must have in your form, for FormMail to work correctly. This is the recipient field.

Field: recipient
Description:

This field specify the email address to which the form will be sent. Most likely you will want to configure this option as a hidden form field with a value equal to that of your e-mail address.
You can include multiple recipients by separating the values with commas. Note:- It is advisable you that you send the form to an email in the same site as the FormMail and then forward it to an external account if need be due to security clause in this script.

Syntax: <input type=hidden name="recipient" value="email@your.host.com"> OR
<input type=hidden name="recipient" value="user@yourhost.com,user2@yourhost.com">
Optional Form Fields

Field: subject
Description: The subject field as you might have guessed is the subject title that will be given to your emailed form.This is especially useful when you have more than one contact form on your site but if you do not have this option turned on, then the script will default to a message subject: WWW Form Submission.
Syntax: If you wish to specify the subject then the format is: - <input type=hidden name="subject" value="Your Subject">

To allow the user to specify a subject the format is: - <input type=text name="subject">
Field: email
Description: This field will allow the user to specify their return e-mail address. If you want to be able to reply to your users' e-mails, I strongly suggest that you include this form field and allow them to fill it. This will be put into the Contact Form field of the message you receive.
Syntax: To requiest an email address from users, add this field name to the required field. <input type=text name="email">
Field: realname
Description: The realname form field will allow the user to input their real name. This field is useful for identification purposes.
Syntax: To request this, put this message header into your from: - <input type=text name="realname">
Field: redirect
Description: If you wish to redirect the user to a different URL, rather than having them see the default response to the fill-out form, you can use this hidden variable to send them to a pre-made HTML page.
Syntax: To choose the URL they will end up at: - <input type=hidden name="redirect" value="http://your.host.com/to/file.html">
Field: required
Version: 1.3 & Up
Description: You can now require for certain fields in your form to be filled in before the user can successfully submit the form. Simply place all field names that you want to be mandatory into this field. If the required fields are not filled, the form will not be sent and the user will be notified about which field they need to fill, and a link back to the form they just submitted will be provided.

To use a customized error page, see missing_fields_redirect
Syntax: If you want to require that they fill in the email and phone fields in your form, so that you can reach them once you have received the mail, use a syntax like:

<input type=hidden name="required" value="email,phone">