gmail SMTP를 사용하여 전자 메일을 보내려고합니다. 다음은 내 코드입니다.gmail SMTP를 사용하여 전자 메일을 Zend
$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의 확장자가 활성화되어 있습니까? –