I have the following piece of code
$to = $row['email'];
//$to = '****';
$subject = 'Test';
$message = "Test";
$headers = array(
'From' => '****',
'Reply-To' => '****',
'X-Mailer' => 'PHP/' . phpversion()
);
if(mail($to, $subject, $message, $headers)) {
echo "Mail sent to: " . $to;
} else {
echo "Mail failed to: " . $to;
}
This code isn't working in one specific page, it shows the mail sent message but its not received, I've checked the spam box as well but not there. The email address is correct, I've tried hard coding it and its still not received.
Whats strange is this code works fine on other page (through with different subject/message)