session_start();
define("TITLE", "DukeOfMarshall - Contact Page");
?>
include("header.php"); ?>
if($HTTP_GET_VARS['email'] == "yes"){
$postedsubject = $HTTP_POST_VARS['subject'];
$postedcontactemail = $HTTP_POST_VARS['contactemail'];
$firstName = $HTTP_POST_VARS["firstName"];
$lastName = $HTTP_POST_VARS["lastName"];
$postedmessage = $HTTP_POST_VARS['message'];
$headers = "From: ".$firstName." ".$lastName." <".$postedcontactemail."> \n";
$headers .= "Reply-To: ".$firstName." ".$lastName." <".$postedcontactemail."> \n";
$headers .= "Return-Path: ".$firstName." ".$lastName." <".$postedcontactemail."> \n";
$headers .= "Organization: Christian Polygyny \n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\n";
$toAddress = "DukeOfMarshall@gmail.com";
$subject = $postedsubject; /* Email Message Submitted By Sender */
$receiptMessage = "You have received a message concerning DukeOfMarshall Website.\n\n----------Begin Message----------\n\n"
."From: ".$firstName." ".$lastName." - ".$postedcontactemail."\n"
.$postedmessage."\n\n----------End Message----------\n\n";
mail($toAddress, $subject, $receiptMessage,$headers);
$contactmessage = "Your Message Was Sent Successfully";
} ?>
echo $contactmessage; ?>
include("footer.php"); ?>