<?php
// set flash vars 
$name = $_REQUEST["name"];
$message = $_REQUEST["message"];
$sender = $_REQUEST["sender"];
$receiver = $_REQUEST["receiver"];
$subject = $_REQUEST["subject"];

// user infomation
$ip = $_SERVER['REMOTE_ADDR'];
$br = $_SERVER['HTTP_USER_AGENT'];

// compose  email 
if(isset($name) && isset($message) && isset($sender) && isset($receiver) && isset($subject) ){
$ToEmail = $receiver;
$mailheader = "From: " .$sender."\r\n";
$mailheader .= "Reply-To: ".$sender."\r\n";
$mailheader .= "Content-type: text/html; charset=iso-8859-1\r\n";
$message_body = "<br/ ><b>Name: </b> ".$name."<br />";
$message_body .= "<br/ ><b>Email: </b> ".$sender."<br />";
$message_body .= "<br/ ><b>Message:</b>  <br /> ".$message."<br /><br />";
$message_body .= "<b>IP Address:</b>  ".$ip. "<br/>";
$message_body .= "<b>Browser Information: </b> ".$br. "<br />";

mail($ToEmail, $subject, $message_body, $mailheader) or die ("Failure");
	
}
?>