Web Hosting Offers
See the new scripts recently added to Dynamic Drive. Click here.
Original, practical CSS codes and examples such as CSS menus for your site.
    Search code samples  
 
  Keyword
 
 
 
   
 
 
  Code Samples
 
ASP
CSS
Dhtml
Html
Javascript
PHP
 
   
     LOGIN HERE  
 
Username
Password
Forgot Password
Verify Signup
 
 
 

Javascript >> Forms >> General

How can i use formail program to send mails?

Visitor Ratings (0) :

Description
1. Download the FormMail cgi script (you can download it from http://www.scriptarchive.com/download.cgi?s=formmail)

2. The FormMail script does not have to be extensively configured in order to work. There are only two variables in the perl file which you will need to define along with changing the top line of your script to match the location of you Perl interpreter.

$mailprog = '/usr/lib/sendmail';
This variable must define the location to your server's sendmail program. If this is incorrect, form results will not be mailed to you.
@referers = ('worldwidemart.com','206.31.72.203');
This array allows you to define the domains that you will allow forms to reside on and use your FormMail script.
@recipients = @referers;
This is the most important variable you need to configure. It is an array of all valid recipients that can be specified.
@valid_ENV = ('REMOTE_HOST','REMOTE_ADDR','REMOTE_USER','HTTP_USER_AGENT');
This new array allows the administrator to specify a list of environment variables that the user may request be added into the e-mail.


3. Log into the server using an FTP program (Download from the Software area) and place the script into your 'cgibin' folder once you are
logged in.

4. Highlight the script and right click to change the scripts 'File Attributes'.

5. Set the script to 755.

6. Once this has been completed you need to point your 'form' to the script so your HTML coding would look like this.

<form method="post" action="http://www.domainname.co.uk/cgibin/FormMail.cgi">
<input type="hidden" name="recipient" value="your@domainname.co.uk">
<input type="hidden" name="subject" value="Online Form response">
Code
Select All
 Rate this Resource