How To Use formmail.cgi
NOTE: formmail.cgi works only on Linux servers. If your site is hosted on the Windows server, the information is not applicable to you.
formmail.cgi is free script from Matt's Script Archive, Inc. If you post information to formmail.cgi, it will send the information to a specified email address.
Please note that formmail.cgi is available only upon request. If you would like to have a copy, please send your request to firstname.lastname@example.org, stating your domain name. Alternatively, you can also download it at http://www.scriptarchive.com/formmail.html.
First, you must configure formmail.cgi to work for you.
Download formmail.cgi to your local hard disk. (In the example below, the formmail.cgi script is downloaded to the local hard disk using the FTP program WS_FTP Pro.
Use a text editor to open formmail.cgi to be edited. (In the example below, Notepad is used to open formmail.cgi.)
Replace the line ...
@referers = ('worldwidemart.com','126.96.36.199');
... with ...
@referers = ('www.mydomain_name');
For example, if your web site is at http://www.my-company-name.com, then the line is...
@referers = ('www.my-company-name.com');
Replace the line ...
@recipients = &fill_recipients(@referers);
... with ....
@recipients = ('^yourself\@yourdomain\.com');
For example, if formmail.cgi is suppose to send information to the email address email@example.com, then the line is...
@recipients = ('^my_name\@my-company-name\.com');
Save the changes, and upload formmail.cgi to your web site.
Now that you have configured your formmail.cgi, the next step is to ...
Configure your form.
Your form must post to formmail.cgi.
This is done by editing the form tag.
An example is ....
<form name="feedback_form" action="./cgi-bin/formmail.cgi" method="post" >
The part that you should edit is ...
The "action" part should point to your formmail.cgi with respect to the location of your form.
Your form should include the "recipients" field.
Your form should include this line within the open and close tags of the form.
<input type="hidden" name="recipient" value="firstname.lastname@example.org">
For example, if the information is supposed to be sent to email@example.com, then the line will look like...
<input type="hidden" name="recipient" value="firstname.lastname@example.org">
If these 2 things are done correctly, your formmail.cgi should work on the whole. There are many other configurations available in formmail.cgi. Please read the README file for more details. (You can download the README file to your local hard disk, then use a text editor to open the README file.)
Please remember to upload your configured formmail.cgi back to the server in ASCII mode, and the set the permissions of formmail.cgi as follows: User: read, write, execute; Group: read, execute; Others: read, execute.
If all of these looks too complicated, fret not!
We can help you configure your formmail.cgi and your form! Just email us at email@example.com, stating your
the full URL path to your form,
the email address that the formmail.cgi is suppose to send the information to,
the full URL path to the web page that is to be displayed after the end user
submits the form.