Hi guys, i have a 'contact us' section on our website which has been working without issue for some time; however I have recently become aware that it has stopped sending emails. No error shows up when it is used, just nothing arrives where it is intended. We did change our domain name a little while ago and im not sure if these issues coincided with this event; however I don't see how that would have impacted this code. Any ideas? Thank you in advance!
if (isset($_REQUEST['btnSubmit']) || isset($_REQUEST['btnSubmit_x']))
{
if (isset($_SESSION['token']) && $_POST['token'] == $_SESSION['token'])
{
$sendTo = "reception@ouremail.com.au";
$from = $txtEmail;
ob_start();
include("mail_contact.php");
$contents = ob_get_contents();
ob_end_clean();
$message = $contents;
//echo "<br>".$message;
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: " . $from;
$subject = "Qwest - Contact Us";
mail($sendTo, $subject, $message, $headers);
header( 'Location: http://www.oursite.com.au/thankyou-contact.php' ) ;
}
else
$errmsg = "Permission Denied..";
}
$token = md5(uniqid(rand(), true));
$_SESSION['token'] = $token;