我有一个在 php 中设置的页面,用于向在我的网站上注册的电子邮件发送新闻通讯。前几天我将代码发送到 30 封电子邮件时,代码运行良好。每个人都收到了电子邮件通讯。两个新人注册了,现在当我尝试发送一个时,它通过了,就好像它在代码中没有任何错误一样发送,但没有人收到时事通讯。
是否与阻止其工作的无效电子邮件地址有关?好像其中一个新的无效并且将其关闭?我没有做任何事情来将代码从它工作时的代码更改为之前的 30 封电子邮件。我的托管公司每天允许超过 250 封电子邮件,所以这根本不是问题。
$mailto = "members@example.com" ;
$headers = "From: chris@example.com \r\n";
$headers .= "Reply-To: chris@example.com \r\n";
$headers .= "BCC: $emails \r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
$from='members@example.com';
$subject="TEST";
$body='<html><body>';
$body.= "<table><tr><td>$content etc...</td></td> </body></html>";
if (mail($mailto,$subject,$body,$headers)) {
code... ; }
else {
code... ; }