Quick Formmail Script Setup
HTML form setup in Allwebco web templates
Steps shown on this page are:
The instructions provided with formmail can be rather complex. Below are the simple steps to setup formmail with your hosting.
- Check if you have a cgi-bin
- Download the script
- Edit the contact.htm
- Edit the script
- Check the contact.htm
- Upload the script
- CHMOD the script
- Setup your email
- Test the contact form
If you DO
have a cgi-bin folder in your hosting FTP login proceed to the next step. If you do NOT
have a cgi-bin in your hosting login see Form Setup Overview
Download the formmail script from one of the following websites:
If the above links are not working, see advanced formmail script
Optionally, the creator of the formmail script (Matt) offers to run the script from their website for a monthly fee. Click here for info on this option.
Allwebco does not support and has not tested this option. All support would be provided by http://www.formmail.com.
Edit your contact.htm or quotes.htm and replace "your-web-domain.com" with your domain name in three places.
If you do have a hosting cgi-bin folder
: From your formmail download, use a plain text editor like Notepad and edit the refers in the formmail.cgi or formmail.pl. To edit the refers, open the formmail script, and find the following line (about 30 lines down) (See also the instructions included with your formmail download):
@referers = ('scriptarchive.com','126.96.36.199');
Change the above shown in red to your domain and your IP. If you do not know your IP you can edit like the following:
@referers = ('yourdomain.com','www.yourdomain.com');
It's best to include the www pointer in the refers, even if you include your IP. You can have all three like the following (using your IP number from your hosting company):
@referers = ('yourdomain.com','www.yourdomain.com','188.8.131.52');
Edit your contact.htm or quotes.htm
with the exact name of the fommail script you downloaded ("formmail.cgi" or "formmail.pl" or "FormMail.pl") hosting is case sensitive, use the exact name. See extra security below.
Check the "contact.htm" or "quotes.htm". If you have uploaded "formmail.cgi" be sure the HTML page <form> line (shown below) is edited for "formmail.cgi", or If you uploaded "FormMail.pl" edit the HTML page <form> line to call for "FormMail.pl" (uploaded files are case sensitive). Edit for either .cgi or .pl if needed. Click for more details.
<form method="post" action="http://your-web-domain.com/cgi-bin/FormMail.pl">
Optional: Adding Extra Security (recommended):
To add more security and prevent auto-hacking of your form script, rename the downloaded "FormMail.pl" to a unique name like "rsender.pl" or something similar. You can name the file any name. Edit the "contact.htm" or "quotes.htm" with the name of your re-named script as shown below.
<form method="post" action="http://your-web-domain.com/cgi-bin/rsender.pl">
Step 6 & 7:
Upload the formmail.cgi or FormMail.pl (or rsender.pl) to your hosting area using FTP software
. Once the script is uploaded, you must CHMOD 755 the file if you have UNIX type hosting. To CHMOD 755 a script right click on the script in the FTP window, choose "CHMOD" then type 755 in the small box. Click below to see this visually in CuteFTP
CHMOD may also be called "File Attributes", "File Properties" or "Permissions" in different software
If you have a Windows hosting setup rather than UNIX, you may need to contact your hosting company to set the formmail file permissions.
Step 8: Setup your e-mail
Create an email account in your hosting control panel for the email you used in the form (step #3 above). You can optionally redirect the email you create to another email like your Gmail or Yahoo account.
Step 9: Test
Open your contact.htm on your website and test the form. If you are getting a "file not found" or other error when you submit the form see formmail not working
or do the steps on this page again from the start.
Note about the e-mail you can use:
Formmail will not let you e-mail outside of your Domain name. e.g. If your Domain is momswarehouse.com your e-mail address on the contact.htm or quotes.htm can not be an MSN.com email address or an AOL or any other, it must be ????@momswarehouse.com. This is a security feature in the formmail script so you cannot relay e-mails out of another mail server.
Contact form setup overview
E-mail help and redirection
Setting up the contact form with another script
(or use alternate download
Alternate FormMail script support