我試圖發送類似的新聞信通過使用Zend_Mail但經過12郵件我得到這個消息如何發送新聞信件中的Zend
致命錯誤:用C超過30秒的最長執行時間:\ Program Files文件\ Zend的\ Apache2的\ htdocs中\ forga \庫\ Zend的\郵件\協議\ Abstract.php線321
我的代碼是這樣的:
$smtpHost = 'smtp.gmail.com';
$smtpConf = array(
'auth' => 'login',
'ssl' => 'tls',
'port' => '587',
'username' =>'[email protected]',
'password' => 'xxxxxxxx'
);
$transport = new Zend_Mail_Transport_Smtp($smtpHost, $smtpConf);
foreach($users as $user)
{
$mail = new Zend_Mail();
$mail->setFrom("[email protected]", 'Forga');
$mail->setSubject($subject);
if($html=='on')
$mail->setBodyHtml($message);
else
$mail->setBodyText($message);
$mail->addto($user);
$transport->send($mail);
}