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

WBOY
Release: 2016-06-13 10:18:09
Original
1136 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' => [email protected]', 'password' => 'abc', 'ssl' => 'ssl' ) );        $mail = new Zend_Mail ( 'utf-8' );        $mail->setBodyHtml ( '<b>你好xxx</b>' );        $mail->setSubject ( 'xxx你好' );        $mail->setFrom ( [email protected]', 'aaa' );        $mail->addTo ( [email protected]', 'xxx先生' );        $mail->send ( $mailTransport );<div class="clear">
                 
              
              
        
            </div>
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template