One of the most popular form to e-mail scripts available is FormMail, by Matt Wright. The script can be setup very quickly, and provides a number of customization options. Because of FormMail's popularity, we have included it as part of this documentation.
The following steps provide quick installation instructions for FormMail. Be sure to read the FormMail README file for more detailed information about customizing FormMail.
To install FormMail:
Download the latest version of FormMail from http://worldwidemart.com/scripts/formmail.shtml.
Open FormMail.pl in a text editor (such as NotePad).
Make sure the Perl path is set correctly. This information can be found on the CPanel homepage. A typical path is: #!/usr/bin/perl
Make sure the Sendmail path is correct. This information can be found on the CPanel homepage. A typical path is: /usr/lib/sendmail
Add you domain to the referrers. For example: @referers = ('www.mydomain.com', '123.123.123.123')
Alter @recipients, if required. A standard setting is: @recipients = @referers
Upload FormMail.pl to your cgi-bin directory, and change the file permissions to 755.
Create the form on your web page, with the following fields:
<form action="http://www.mydomain.com/cgi-bin/FormMail.pl" method="POST"> <input type="hidden" name="recipient" value="email@mydomain.com"> <input type="hidden" name="subject" value="Feedback from website"> <input type="hidden" name="redirect" value="http://www.mydomain.com/thankyou.htm">
Upload the web page and test the form.