Location: PHPKode > scripts > SiteMail 2.0 > sitemail-2-0/README.TXT
# About
phpsitemail v2.0 ©2003 http://netcode.net

you are free to use this script however you like aslong as the notices remain intact.


# Stuff it does

 - Send mail to any address
 - Senders IP is displayed in the mail
 - Checks for blank fields
 - Checks for valid email format
 - Option to switch theme on/off

# Requirements

PHP 4+
Use of mail()
An email account :-)

# Installation

Open the file vars.php
There's four variables $style, $to, $site_name, $site_addr

$style     - this script is designed as a stand alone form with the theme, but
           if you want to try and include the form into your own pages, set this
           to 0 and it wont use the stylesheet.
         
$to        - set this to the email address you want the mail sent to

$site_name - the name of your website

$site_addr - the address(url) of your website

Upload all the files to your home directory (same directory as your index page)

############################### !!!!!! NOTE !!!!!!! ################################

If you are on a windows server, there's a function in the script that's not supported.
You will need to open up contact.php and replace this:

function docheck( $email ) 
{ 
if (eregi("^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]{2,4}$", $email, $valid)) 
{ 
if (getmxrr( substr(strstr($valid[0], '@'), 1),$mxhosts)) 
{ 
return true; 
} 
} 
return false; 
}

With this:

function docheck( $email ) 
{ 
if (eregi("^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]{2,4}$", $email)) 
{ 
return true; 
} 
else { 
return false; 
} 
}

That's it, go to http://yoursite.com/contact.php and you're done.
Return current item: SiteMail 2.0