Sam,
Here you go:
$mailprog = '/usr/sbin/sendmail -i -t';
Further down the script is another important part you will have to alter:
@referers = ('mydomain.name','
www.mydomain.name');
In this line, you should include all domain names that are going to use this script. Usually this is just your website with us. Make sure you put the actual hosted domain name in here.
@recipients = &fill_recipients(@referers,'
services@123-reg.co.uk');
In this line ensure you enter the email address you are sending the files to instead of
services@123-reg.co.uk.
This file can now be saved and uploaded to your website. Make sure you upload the file in ASCII/text mode and NOT in binary mode. Also, ensure it has read and execute permissions (755) for user group and all, as well as write permissions for the user.
Next, move onto your HTML file where your visitors fill in the form, and make sure the code below is included.
<form action="/formmail/formmail.cgi" method="post">
//Make sure this is the correct path to your FormMail script.
<input type='hidden' name="recipient" value="
services@123-reg.co.uk"/>
//Make sure this is the e-mail address you are sending the details to.
<input type='hidden' name="subject" value="Form Results"/>
//Replace the value with the one you want the subject of the email results to be.
<input type='hidden' name="required" value=""/>
//Add any field names the visitor has to fill in for the form to work.
<input type='hidden' name="redirect" value="done.html">
//Enter the location of the "thank you" HTML page here.