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:

Step 1: Go to and download the FormMail script

download formmail

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 by using your Mouse  to right click this file in the remote site and choosing permissions.

Step 2: Edit the FormMail script

The formmail script is packaged with a README file, although the following two changes will need to be made to the 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( localhost);
@allow_mail_to     = qw(you@your.domain localhost);

The items above in Red should be updated to your email address. The IP address above( 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 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/”>
<input type=”hidden” value=”” 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.