這裏發送批量電子郵件是我的功能問題與使用PHP
function send_edm ($u_email_sender_name, $u_content, $u_mail, $u_subject, $edm_id) {
foreach ($edm_email as $value) {
$this->rege = Route :: loadClass('core_route_regclass');
$this->sendmail = $this->rege->phpmailer();
$this->sendmail->Mailer = "mail";
$this->sendmail->IsHTML(true);
$email_sender = $u_email_sender_name;
$mail = $config->company_email;
$subject = $u_subject;
$fromwhere = $email_sender;
$content = $u_content;
$this->sendmail->From = $fromwhere;
$this->sendmail->FromName = $fromwhere;
$this->sendmail->AddAddress($value["email"]);
$this->sendmail->Subject = $u_subject;
$this->sendmail->CharSet = "utf-8";
$this->sendmail->Encoding = "base64";
$this->sendmail->Body = $u_content;
$this->sendmail->AltBody = "This is the body in plain text for non-HTML mail clients";
if(!$this->sendmail->Send())
{
echo "Message could not be sent. <p>";
}
}
}
,如果我送過來1000或更多的電子郵件使用該功能來發送,不會是任何錯誤發生可能會導致發送的中斷處理?如何提高使用PHP發送電子郵件的可靠性?
感謝