Step 1: Download the newest copy of the Form Mail script from http://www.scriptarchive.com/download.cgi?s=formmail.
Step 2: Unzip the archive and open the FormMail.pl file using your preferred text editor (e.g. notepad).
Step 3: Edit the following settings located at the top of the file…
Â
locate:
Â
$mailprog = '/usr/lib/sendmail -i -t';
… and replace with:
$mailprog = '/usr/sbin/sendmail -i -t';
Now locate:
@referers = ('scriptarchive.com','72.52.156.109');
… and replace with:
@referers = ('yourdomain.com');
Note: Make sure that you replace yourdomain.com with your actual domain name.
Â
Step 4: Using FTP, upload the saved file from step 3 to the cgi-bin for your website (normally found at public_html/cgi-bin).
Step 5: Still using FTP, change the permissions of the FormMail.pl file to allow it to be executable (e.g. 0755).
Step 6: Open the file you wish to place the contact form on and paste the following code.
Â
<form id=â€contact†name=â€contact†method=â€POST†action=â€/cgi-bin/FormMail.plâ€>
Â
<label>Your Email: </lable><input type=text name=â€email†/><br />
<label>Subject: </lable><input type=text name=â€subjectâ€/><br />
<label>Message: </lable><textarea name=â€body†id=â€body†cols=â€45″ rows=â€5″></textarea><br />
Â
<input type=hidden name=â€recipient†value=â€[email protected]†/>
<input type=hidden name=â€redirect†value=â€http://yourdomain.com/thankyou.html“/>
<input type=â€submit†name=â€button†id=â€button†value=â€Send†/>
Â
</form>
Step 7: Save the file and execute the link.