/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// file.ini [smtp] serwer=yanek.code-laboratory.com username=yanek@code-laboratory.com password=pass // controller $smtp = new Zend_Config_Ini ('/application/config/file.ini', 'smtp'); $transport = new Zend_Mail_Transport_Smtp($smtp->serwer, $config); foreach ($mails as $mail){ try { $zm = new Zend_Mail('utf-8'); $zm->setBodyHtml( 'hello world' ); $zm->setFrom( $smtp->username, 'yanek' ); $zm->addTo( $mail ); $zm->setSubject( 'Subject' ); $zm->send($transport); } catch (Exception $e){} }