How to send news letters in zend
- by Sherif
i am trying to send something like news letter Via Zend_Mail but after 12 mail i got this message
Fatal error: Maximum execution time of 30 seconds exceeded in C:\Program Files\Zend\Apache2\htdocs\forga\library\Zend\Mail\Protocol\Abstract.php on line 321
my Code is like:
$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);
}