我有一个向我的会员发送电子邮件的脚本,它成功地向前141个用户发送电子邮件,然后对剩下的100多个用户(所有用户都有有效的电子邮件)失败。
任何人都有任何想法,为什么它会在循环中停止运作?
我基本上是在循环中执行此操作:
$Log->Notice("Iteration " . $count . ": About to send email to $name ($address)");
$mail->ClearAddresses();
$mail->AddAddress($address, $name);
if(!$mail->Send())
{
echo " - FAILED to send email: " . $mail->ErrorInfo . "<br/>" . $NL;
$Log->Error("Failed to send email");
$Log->Error($mail->ErrorInfo);
$num_fail++;
} else {
echo " - Email sent" . $NL;
$Log->Notice("Email successfully sent");
$num_success++;
}