Я пытаюсь отправить письмо с помощью gmail SMTP. Следующий мой код.Zend электронной почты с помощью gmail SMTP
$mail = new Zend_Mail();
$config = array(
'ssl' => 'ssl',
'port' => '465',
'auth' => 'login',
'username' => '[email protected]',
'password' => 'mypassword'
);
$transport = new Zend_Mail_Transport_Smtp('smtp.gmail.com', $config);
$sendNow = $mail->setBodyHtml($message)
->setFrom('[email protected]', 'abc def')
->addTo($recipient)
->setSubject($subject)
->send($transport);
Но следующая погрешность возникает. Как это сделать?
Fatal error: Uncaught exception 'Zend_Mail_Protocol_Exception' with message 'Unable to find the socket transport 'ssl' - did you forget to enable it when you configured PHP?' in Implementation\trunk\webapp\library\Zend\Mail\Protocol\Abstract.php:277
включен ваш SSL продление? –