I have a PHP script on my website that sends emails using the basic mail() function — not SMTP or wp_mail() from WordPress. The email sends successfully to other addresses I own (like Gmail and Outlook), but emails sent to my Zoho-hosted address are never received — not even in the spam folder.
The sending address is
no-reply@info.fake.com, which is a Bluehost-hosted subdomain email. Here's the exact PHP code I'm using to send the email:
<?php
// Send email using raw PHP mail()
function send_email_test() {
$to = '
fake@fake.com'; // My Zoho address
$subject = 'Email Test v2';
$message = '<h2>v2 This is a test email</h2>
<p>The email system is working properly.</p>
<p><strong>Time:</strong> ' . date('Y-m-d H:i:s') . '</p>';
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type: text/html; charset=UTF-8" . "\r\n";
$headers .= "From:
no-reply@info.fake.com" . "\r\n";
$headers .= "Reply-To:
no-reply@info.fake.com" . "\r\n";
$headers .= "X-Mailer: PHP/" . phpversion();
if (mail($to, $subject, $message, $headers)) {
echo "Mail sent successfully.";
} else {
echo "Mail failed to send.";
}
}
send_email_test();
?>
Emails sent using this code arrive everywhere except my Zoho mailbox (
fake@fake.com). Can you help me determine why Zoho isn't accepting or delivering these?