Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/275.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
PHPMailer-错误无法实例化邮件函数_Php_Phpmailer_Mailer - Fatal编程技术网

PHPMailer-错误无法实例化邮件函数

PHPMailer-错误无法实例化邮件函数,php,phpmailer,mailer,Php,Phpmailer,Mailer,我有一个向我的会员发送电子邮件的脚本,它成功地向前141个用户发送电子邮件,然后对其余100多个用户(所有用户都有有效的电子邮件)发送电子邮件失败 有人知道为什么它在循环中会停止工作吗 我基本上是在循环中这样做的: $Log->Notice("Iteration " . $count . ": About to send email to $name ($address)"); $mail->ClearAddresses(); $mail->AddAddress($addres

我有一个向我的会员发送电子邮件的脚本,它成功地向前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++;
}
$Log->通知(“迭代”$count.”:即将向$name($address)发送电子邮件;
$mail->ClearAddresses();
$mail->AddAddress($address,$name);
如果(!$mail->Send())
{
echo”-发送电子邮件失败:“..mail->ErrorInfo.”
“$NL; $Log->错误(“发送电子邮件失败”); $Log->Error($mail->ErrorInfo); $num_fail++; }否则{ echo”-发送的电子邮件“$NL; $Log->通知(“电子邮件成功发送”); $num_success++; }
是否总是前141个用户?列表中第142个用户的电子邮件地址是否有什么奇怪的地方?是否内存不足?执行超时在php.ini中设置为更高的值?您的排序达到了极限。考虑在50封电子邮件中批处理,然后在接下来的50封电子邮件中批处理,是否使用cron?本地主机?共享主机?大量主机让我们限制你可以发送的电子邮件数量