Home > Backend Development > PHP Tutorial > 请教关于Zend framework中的Zend_Mail的有关问题

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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 13:35:07
Original
947 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 ( '<b>你好xxx</b>' );
        $mail->setSubject ( 'xxx你好' );
        $mail->setFrom ( 'aaa@gmail.com', 'aaa' );
        $mail->addTo ( 'xxx@qq.com', '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
Latest Issues
PHP mail sending corrupted headers
From 1970-01-01 08:00:00
0
0
0
php mail cannot send email
From 1970-01-01 08:00:00
0
0
0
PHP mail function cannot send email completely
From 1970-01-01 08:00:00
0
0
0
PHP mail function cannot complete sending email
From 1970-01-01 08:00:00
0
0
0
PHP mail function cannot complete sending email
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template