FormMail is a popular script that you can use with your website so that visitors can fill it out and have their response emailed directly to you. This is not the only method to set up FormMail but is generally considered the most straight forward. To help you set up FormMail on your website, we have outlined the steps to install and set up FormMail:
Next, edit the @allow_mail_to line and replace the existing information with any email addresses that you want the completed form information sent to. If you will be sending a form to multiple recipients or allowing users to choose different recipients, make sure you add each email address with a single space between them.
@allow_mail_to = qw(
Make sure you remove localhost from both the @referers and the @allow_mail_to lines.
After making these two changes, save and close the file.
Once you have created your contact form, you will need to point the action of the FORM tag to the FormMail.pl script inside the cgi-bin folder:
You will also need to include a hidden input tag to tell the form which email address to send to.
<input type="hidden" name="recipient" value="
" / >
This tag tells the form which email address to send the form to. Just make sure that this email is one of the addresses in the @allow_mail_to line in FormMail.pl
There are also two optional tags you can include in your form to specify the subject line of the email that gets delivered to you and what page (URL) users will be redirected to once they have submitted the form:
Specify Email Subject Line:
<input type="hidden" name="subject" value="From the feedback form" / >
You can edit the subject as you like so you can easily recognize emails received from your contact form
Please note in the example above, you will need to create the thankyou.html file. You can also name this file differently (thanks.html for example). Just make sure that name of the file you create matches the name of the file referenced in the tag (e.g. value="http://www.yourdomain.com/thanks.html" / >. This tag is completely optional, if you do not include this tag, users will instead be redirected to the default FormMail Thank You page:
Finally in order for FormMail to work, make sure the permissions on the FormMail.pl file are set to 755. If this needs to be changed; in the File Manager, right click on the file and select "change permissions."
Did you find this article helpful?
We value your feedback!
Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve this article:
new! - Enter your name and email address above and we will post your feedback in the comments on this page!