$sysmail = "comedyy12@gmail.com";
if ($_POST['sendmessage'])
{
if(!isset($_POST['message']))
{
$messages = "You're email needs to contain a message, dummy!!!
";
}
elseif(!preg_match("/^.*?@.*?$/", $_POST['email']))
{
$messages = "Stop trying to trick me and use a real email, or me and you will fall out!!
";
}
elseif(mail($sysmail, stripslashes(trim($_POST['subject'])), stripslashes(trim($_POST['message'])), "From: " . $_POST['email'] . "\r\n"))
{
$messages = "Thanks for your message someone will get back to you shortly.
";
}
else {
$messages = "The programmer who wrote this isn't as clever as he thinks, and something has gone wrong.
";
}
}
?>