zend framework gmail
I'm trying to use zend mail for sending in one of my application.
I'm not sure what is the basic requirement for using zend_mail.
$this->开发者_开发技巧;transport = new Zend_Mail_Transport_Smtp(
'smtp.gmail.com',
array(
'ssl'=> 'tls',
'port'=> '587',
'auth'=> 'login',
'username'=> 'email@email.com',
'password'=> 'password'
));
Zend_Mail::setDefaultTransport($this->transport);
and while sending mail
$mail->send($this->transport);
and handled error using
$e->getCode().$e->getMessage();
script gives me error 05.5.2
I'm not able to understand what is the issue.
The port should be 465!!!! Then it works. By me as well!
Leave the port off:
$config = array('auth'=>'login', 'username'=>'', 'password'=>'', 'ssl'=>'tls');
$transport = new Zend_Mail_Transport_Smtp('smtp.gmail.com', $config);
$mail->send($transport);
精彩评论