<?php
if(!$visitormail == "" && (!strstr($visitormail,"@") || !strstr($visitormail,".")))
{
echo "<p align=\"center\">You need to enter a valid e-mail address<br><a href=\"index.php\">Click here</a> to go back</p>\n";
}
else
{
if(empty($visitor) || empty($visitormail) || empty($notes )) {
echo "<p align=\"center\">Please fill in the form<br><a href=\"index.php\">Click here</a> to go back</p>\n";
}
else
{
$todayis = date("l, F j, Y, g:i a") ;
$attn = $attn ;
$subject = $attn;
$notes = stripcslashes($notes);
$message = "Sent on: $todayis [GMT] \n
Regarding: $attn \n
Enquiry: $notes \n
From: $visitor ($visitormail)\n
Browser Info: $httpagent \n
";
$from = "From: $visitormail\r\n";
mail("YOUR EMAIL ADDRESS", $subject, $message, $from);
if($cc == "yes") {
mail($visitormail, $subject, $message, "From:YOUR EMAIL ADDRESS\r\n");
$copy = "This has been copied to $visitormail";
}
?>
</p>
</div>
<p align="center"><b>
Thank you for you email, we will try to reply to the address <?php echo $visitormail ?> asap. </b>
<?php
}
}
?>