We have been using the following to send email for several years now.
Recently we've encountered the following:
The first is sent and received.
The second is presumed to be sent but not received.
This does not happen with any consistency, in other words both will be sent and received for days and days and then, suddenly the customer receives their email
and we don't.
Has anyone encountered this? I have done lots of searches and I can't come up with it elsewhere.
<?
////////////////// CUSTOMER Email //////////////////
$to = "$email";
$subject = "Your NML order for blah blah";
$msg = "Yada yada yada\n";
$msg .= "yada yada yada\n";
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "Reply-to: <our@email.com>\r\n";
$headers .= "From: US<our@email.com>\r\n";
$headers .= "X-Mailer: PHP/" . phpversion();
mail($to, $subject, $msg, $headers);
////////////////// OUR Email //////////////////
$to = "US<our@email.com>";
$subject = "Order from Mr. Who's He What's It";
$msg = "Yada yada yada\n";
$msg .= "yada yada yada\n";
$msg .= "yada yada yada\n";
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "Reply-to: <$email>\r\n";
$headers .= "From: <$email>\r\n";
$headers .= "X-Mailer: PHP/" . phpversion();
mail($to, $subject, $msg, $headers);
?>