请教关于Zend framework中的Zend_Mail的有关问题

WBOY
Release: 2016-06-13 13:35:07
Original
852 people have browsed it

请问关于Zend framework中的Zend_Mail的问题
我用qq和gmail的smtp server做转发,为什么总是出现Authentication failed错误?

------解决方案--------------------

gmail的。qq的没试过,
zendmail的使用方法如下,试过可用

PHP code
$mailTransport = new Zend_Mail_Transport_Smtp ( 'smtp.gmail.com', array ('auth' => 'login', 'username' => 'aaa@gmail.com', 'password' => 'abc', 'ssl' => 'ssl' ) ); $mail = new Zend_Mail ( 'utf-8' ); $mail->setBodyHtml ( '你好xxx' ); $mail->setSubject ( 'xxx你好' ); $mail->setFrom ( 'aaa@gmail.com', 'aaa' ); $mail->addTo ( 'xxx@qq.com', 'xxx先生' ); $mail->send ( $mailTransport ); 
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!