FormMail is a script that allows you to add a contact form to your website. This article is meant to discuss how to install NMS formmail from the following URL: http://www.scriptarchive.com/nms.html
Once this has been downloaded, extract the files and connect to your account using an FTP client such as FileZilla. You will need to enter your cPanel/FTP login details to connect to your account.
The files that are located in the formmail folder that you extracted will be extracted to a folder named ~/nms-formmail/nms-formmail. Once you are connected to your account through and FTP client, and have opened ~/public_html/cgi-bin you can browse to the folder on your computer and upload the formmail script. Once this has been done, you can change the permissions of the file to 755 that is named FormMail.pl by using your Mouse to right click this file in the remote site and choosing permissions.
The formmail script is packaged with a README file, although the following two changes will need to be made to the FormMail.pl file contents in order for this script to work properly:
$mailprog = ‘/usr/lib/sendmail -oi -t';
should be changed to:
$mailprog = ‘/usr/sbin/sendmail -oi -t';
‘mailprog’ => ‘/usr/lib/sendmail -oi -t’,
should be changed to:
‘mailprog’ => ‘/usr/sbin/sendmail -oi -t’,
@referers = qw(dave.org.uk 126.96.36.199 localhost);
@allow_mail_to = qw(email@example.com firstname.lastname@example.org localhost);
The items above in Red should be updated to your email address. The IP address above(188.8.131.52) should be changed to the IP of your domain. You can find the IP of your account in cPanel -> Expand Stats on the left side of the page under the Shared or Dedicated IP address, or by going to whatsmydns.net and searching for your domain’s A record.
In order for your forms to process using this script, the following code should be added to the page in your public_html directory that contains your form fields:
<FORM METHOD=POST ACTION=”cgi-bin/formmail/FormMail.pl”>
<input type=”hidden” value=”email@example.com” name=”recipient” />
The script that you add is assuming your form resides in a file that is located in public_html.
Once again, change the email address to your own intended recipient so that you receive these forms as they are submitted.
If you encounter any errors or problems with this process, please contact our technical support department. They will be happy to help resolve any issues you experience.