Introduction
FormMail.cgi is a generic www form to email gateway. It will parse
the results of any form you create with HTML and send them to the
specified user. FormMail.cgi is a Perl script and it has many
formatting and operational options, most of which can be specified
through the form, meaning you don't need any programming knowledge
or multiple scripts for multiple forms.
To user FormMail.cgi on your site, follow these steps:
* Create your form using HTML
* Change the post action to:
<form action="/cgi-sys/FormMail.cgi">
OR the place you uploaded FormMail.
Example: <form action="/cgi-bin/FormMail.cgi">
You now need to edit your form so that it can execute the script.
You do this by editing the "form action" statement in the form to
point to the path where FormMail.cgi resides. Your need to edit the
"form action" statement to read:
<form action="/cgi-bin/FormMail.cgi">
as shown on the following screenshot. Also make sure that the method
is "post."
You now need to
tell FormMail.cgi where to send email. You do this by entering a
"hidden field" on the form itself. Enter the following line on your
form and make sure you enter the email address where you would like
to receive email.
Activiate
FormMail via the control panel (within CGI Scripts) or Upload
FormMail.cgi to your server in ASCII mode not BINARY- (This
is very important).
Change the permissions for FormMail. FormMail requires that you make
it executable. Many FTP applications allow you to change a file to
executable by right-clicking the file on the remote system and
clicking
CHMOD.
FormMail requires a CHMOD setting of 755.
Additional Variables
HOW TO SPECIFY THE RECIPIENT OF THE EMAIL
The following should be configured to send the results to your email
address.
<INPUT TYPE="hidden" name="recipient" value="me@yourdomain.com">
HOW TO GIVE THE EMAIL A SUBJECT
Below you should fill in the subject that the email should have when
you receive it
<INPUT TYPE="hidden" name="subject" value="Order from my customer">
HOW TO SPECIFY YOUR OWN SUBMISSION RESPONSE
The next line will redirect to a thank you page of your choice - if
you do not include this you will get the standard thank you greeting
with a summary of the details sent.
<INPUT TYPE="HIDDEN" NAME="redirect" VALUE="http://www.yourdomain.com/thankyou.html">
HOW TO CUSTOMISE THE DEFAULT SUBMISSION RESPONSE
If you decide to use the default thank you page you will need to use
the following 4 fields - the first gives the default thanks page a
title.
<INPUT TYPE="hidden" name="title" value="Your thank you page name">
the below gives a link from the thankyou page to a page of your
choice
<INPUT TYPE="hidden" name="return_link_url" value="http://{yourdomain}/{yourpage}">
and this will specify the text displayed for this link.
<INPUT TYPE="hidden" name="return_link_title" value="Back to main
page.">
you can also set a background for the default thank you page
<INPUT TYPE="hidden" name="background value="http://{yourdomain}/my.gif">
or a background colour for this default thank you page
<INPUT TYPE="hidden" name="bgcolor" value="#FFFFFF">
you can alter the text colour
<INPUT TYPE="hidden" name="text_color" value="#000000">
and the link colour
<INPUT TYPE="hidden" name="link_color" value="#FF0000">
as well as the visited link colour
<INPUT TYPE="hidden" name="vlink_color" value="#0000FF">
and the active link colour
<INPUT TYPE="hidden" name="alink_color" value="#0000FF">
HOW TO MAKE CERTAIN FIELDS COMPULSORY
To make sure that certain parts of your form are filled in put in
the following line
<INPUT TYPE="hidden" name="required" value="email,phone,{another
field on my form}">
HOW TO RETURN FORM FIELDS IN A CERTAIN ORDER
You may sort the fields in the return email alphabetically
<INPUT TYPE="hidden" name="sort" value="alphabetic">
or by in specific order
<INPUT TYPE="hidden" name="sort" value="order:field1,field2,field3">
HOW TO CUSTOMISE THE EMAIL HEADER
Include the below tag for the email address of the person - it will
then be placed in the from field of the email you receive.
<INPUT TYPE="text" name="email">
Include the below tag to have the persons name included in the from
tag
<INPUT TYPE="text" name="realname">
You can always find the latest FormMail for download
here
|