How to Set-up up FormMail 1.92
 
 

FormMail Overview

FormMail is a CGI script, which takes the results of any form and sends them to a specified email address. You do not need to know how to program and you do not have to use multiple scripts for multiple forms. You can alter the behaviour of FormMail by using other fields in your form.

Back to Top


Obtaining FormMail

1. Visit the FormMail website and download a copy of the script. Follow their instructions for installation.

2. Upload the "FormMail.pl" file into your local "/cgi-bin" directory.

3. Change the permissions to "chmod 755". See below

Click Ok.

4. Your path to FormMail will be "http://www.yourname.com/cgi-bin/FormMail.pl". This will be the action of the form.

Back to Top


Using FormMail

1. Create a form with any decent web page creation software.

2. Within the form tag add the following hidden field.

<input type=hidden name="recipient" value="email_address">

email_address - Enter the email address where you want the results of the form to be sent.

3. Change the action line of the form to match the code below.

<form method="POST" action="/cgi-sys/FormMail.pl">

Back to Top


Optional Form Field

Field: subject
The subject field will allow you to specify the subject that you wish to appear in the email that is sent to you after the form has been filled out. If you do not have this option turned on, the script will automatically enter "WWW Form Submission" as the subject.

Code:
If you wish to choose what the subject is:
<input type=hidden name="subject" value="email_subject">

To allow the user to choose a subject:
<input type=text name="subject">

Field: email
This form field will allow the user to specify their return email address. This will be put into the "From:" field of the email.
Code:
<Input type=text name="email">

Field: realname
The realname form field will allow the user to input their real name. This field is useful for identification purposes and will also be put into the "From:" line of the email.
Code:
<Input type=text name="realname">

Field: sort
This field allows you to choose the order in which you wish your variables to appear in the email. You can choose to have the field sorted alphabetically or specify a set order.

By leaving this field out, the order will simply default to the order in which the browser sends the information to the script (which isn't always the exact same order they appeared in the form).

When sorting by a set order of fields, you should include the phrase "order:" as the first part of your value for the sort field, and then follow that with the field names you want to be listed in the email message, separated by commas.
Code:
To sort alphabetically:
<input type=hidden name="sort" value="alphabetic">

To sort by a set field order:
<input type=hidden name="sort" value="order:field1,field2,etc...">

Field: redirect
If you wish to redirect the user to a different URL, you can use this hidden variable to send them to an existing HTML page.
Code:
To choose the URL where the user will end up:
<input type=hidden name="redirect" value="redirect_url">

To allow the user to specify the URL where he wishes to travel:
<input type=text name="redirect">

Field: required
You can now require that certain fields in the form are filled in before the user can successfully submit the form. If the required fields are not filled in, the user will be notified of what they need to fill in, and they will be provided with a link back to the form.
Code:
<input type=hidden name="required" value="required_field1,required_field2">

Field: env_report
This field allows you to have Environment variables included in the email. This is useful if you wish to know what browser they were using, what domain they were coming from, or any other attribute which is associated with environment variables. The following is a short list of valid environment variables that might be useful:

REMOTE_HOST - Provides the name of the remote host making a request.

REMOTE_ADDR - Provides the IP address of the remote host making the request.

HTTP_USER_AGENT - Provides the browser the client is using to send the request. General format: software/version library/version.

Code:
<input type=hidden name="env_report" value="environment_variable1,environment_variable2">

Field: title
This form field allows you to specify the title and header that will appear on the confirmation page if you do not specify a redirect URL.

Code:
<input type=hidden name="title" value="title">

Field: return_link_title
This is the title of the link on the confirmation page that will take the user to the page you specify with the field "return_link_url".

Will not work with the "redirect" field.

Code:
<input type=hidden name="return_link_title" value="link_title">

Field: return_link_url
This is the URL of the link on the confirmation page whose title you specified with the "return_link_title" field.

Will not work with the "redirect" field.

Code:
<Input type=hidden name="return_link_url" value="page_url">

Field: background
This form field allows you to specify a background image for the confirmation page.

Will not work with the "redirect" field.

Code:
<Input type=hidden name="background" value="http://yourdomain.com/image.gif">

Field: bgcolor
This form field allows you to specify a background color for the confirmation page.

This field will not work with the "redirect" or "background" field.

Code:
<input type=hidden name="bgcolor" value="hexidecimal_color">

hexidecimal_color - For a list of hexidecimal colors, click here.

Field: text_color
This field will specify the color of the text on the confirmation page.

Will not work with the "redirect" field.

Code:
<input type=hidden name="text_color" value="hexidecimal_color">

hexidecimal_color - For a list of hexidecimal colors, click here.

Field: link_color
This field will specify the color of the links on the confirmation page.

Will not work with the "redirect" field.

Code:
<input type=hidden name="link_color" value="hexidecimal_color">

hexidecimal_color - For a list of hexidecimal colors, click here.

Field: vlink_color
This field will specify the color of the visited links on the confirmation page.

Will not work with the "redirect" field.

Code:
<input type=hidden name="vlink_color" value="hexidecimal_color">

hexidecimal_color - For a list of hexidecimal colors, click here.

Field: alink_color
This field will specify the color of the active links on the confirmation page.

Will not work with the "redirect" field.

Code:
<input type=hidden name="alink_color" value="hexidecimal_color">

hexidecimal_color - For a list of hexidecimal colors, click here.

Back to Top


Other Form Fields

Any other form fields that appear in your script will be mailed back to you and displayed on the confirmation page if you do not have the "redirect" field set.

 
 

 
Click to verify

Home  |  Hosting  |  Support  |  Contact Us  |  About Us  |  Domain Check  Resellers
Copyright © 2004 www.concordnet.com.au. All Rights Reserved. A Division of Cascade iCOM Pty Ltd ACN: 103 893 410