Location: PHPKode > scripts > Silentum FormSend > send.php
<?PHP
	/*
	Silentum FormSend v1.7
	Modified July 8, 2012
	send.php copyright 2005-2012 HyperSilence
	*/

	include("options.php");

	$today = date("F d, Y / h:i:sa");
	$subject = $HTTP_POST_VARS["subject"];
	$name = $HTTP_POST_VARS["name"];
	$email = $HTTP_POST_VARS["email"];
	$message = $HTTP_POST_VARS["message"];

	$compile = $today."\n\nName: ".strip_tags(stripslashes($name))."\nEmail Address: ".strip_tags(stripslashes($email))."\nMessage: ".strip_tags(stripslashes($message))."\nIP Address: ".$_SERVER["REMOTE_ADDR"];
	
	$headers = "From: ".$email."" . "\r\n" . "Reply-To: ".$email."" . "\r\n" . "X-Mailer: PHP/" . phpversion();

	if(preg_match("/^[\.0-9a-z_-]{1,}@[\.0-9a-z-]{1,}\.[a-z]{1,}$/si", $email)) $valid_email_address = true;
	else $valid_email_address = false;

	if($subject == "") {
	header("Location: ".$form_file."?msg=1");
	exit;
	}
	elseif($name_required == true && $subject != "" && $name == "") {
	header("Location: ".$form_file."?msg=2");
	exit;
	}
	elseif($email_address_required == true && $subject != "" && $email == "") {
	header("Location: ".$form_file."?msg=3");
	exit;
	}
	elseif($email_address_required == true && $valid_email_address == false) {
	header("Location: ".$form_file."?msg=4");
	exit;
	}
	elseif($message_required == true && $subject != "" && $message == "") {
	header("Location: ".$form_file."?msg=5");
	exit;
	}
	elseif(strlen($message) >= $maximum_characters && $subject != "") {
	header("Location: ".$form_file."?msg=6");
	exit;
	}
	else {
	mail($email_address, $subject, $compile, $headers);
	header("Location: ".$form_file."?msg=7");
	exit;
	}
?>
Return current item: Silentum FormSend