Location: PHPKode > scripts > SXD Contact > sxd-contact/send_email.php

SXD Form Mailer version 1.0
Made by: SXDesigns (Kris McGee)
This script is free to use as long as you include a link back to my site
http://www.statix.f2s.com ... If you would like to remove the link, please contact me for
further details. Any questions or comments can be mailed to hide@address.com
See the readme file for information on editing scripts.

//Set to address and http referer
$send_to="hide@address.com"; // email where you want the mail to go
$refer="http://www.statix.f2s.com"; // This should be your base domain, without a trailing slash

Do not edit anything below this line

//check to see if form is being sent from our domain
if(eregi("$refer", $HTTP_REFERER)) { 
   } else {  
    echo("You can only access this script from the correct domain. Further attempts will be logged");

//Strip out html from input

//add in users remote address for security 
$body2="From:".$from."Remote Address:".$HTTP_REMOTE_ADDR." " .$body;

//check to make sure from email is in valid format
if(ereg("([[:alnum:]\.\-]+)(\@[[:alnum:]\.\-]+\.+)", $from)) { 
else {
 	echo("Your email address is not in valid format, please go back and correctly enter the address");

//send mail if everthing checks out
if(($x == "3") && ($xx == "1")){
	mail($send_to, $subject, $body2);
	echo("Your mail has been sent. We will reply shortly.<br><br>");
echo(" <br>The details of this error are logged.");
Return current item: SXD Contact