Comment » Website Feedback Forms Using nms FormMail
While finishing up the contact page for BunnyOne Design I decided that I wanted to include a feedback form. I was looking for a way to send the form results to an email address, and ended up using nms FormMail.
nms FormMail is a nice little Perl script that is open source and allows for tons of customization options. This is a great script that allows anyone who knows how to create HTML forms to . Below are the instructions on how I configured it on my website. My webhosting is provided by InMotion Hosting, so configuration for your website may be slightly different.
nms FormMail is written in Perl, so make sure your host supports CGI scripts.
Installation
- Grab the latest version of nms FormMail from here. I used the compat package. Save it to a place where you can find it.
- Unzip the files to your local computer's hard drive.
- Navigate through the folders until you find the file "FormMail.pl" (without the quotes).
- Edit the settings as needed using a plain text editor such as Crimson Editor. See below for more information on which settings to change.
- Upload the file to the /cgi-bin/ folder on your webhost's server.
- Set the permissions on the script to 755 (chmod 755). If the permissions aren't set to execute, an error message will show after the visitor tries to submit the form.
- In some cases you may need to rename the script from "formmail.pl" to "formmail.cgi".
Configuration
Basic configuration of this script requires changing only a couple of fields.
- @referers (should be around line 47) - change the code inside the parathesis to the name of your website (mydomain.com). The default value is
dave.org.uk 209.207.222.64 localhost. After you are done, the line should look something like this:@referers = qw(mydomain.com); - @allow_mail_to (should be around line 48) - change the code inside the parathesis to the email you want the form to be sent to. The default value is
localhost. You want it to instead read:@allow_mail_to = qw();
This is the bare minimum setup I needed in order to process the results and send them to an email address.