I used the smtpserver of qq and gmail to forward Zend_Mail in Zendframework. why is there always an Authenticationfailed error ?, Gmail. I have never tried qq. zendmail is used as follows. I have tried PHPcode $ mailTr. could you tell me about Zend_Mail in Zend framework?
I use the smtp server of qq and gmail for forwarding. why is there always an Authentication failed error?
------ Solution --------------------
Gmail. Qq has never tried,
Use zendmail as follows:
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 ('Hello xxx'); $ Mail-> setSubject ('XXX '); $ mail-> setFrom ('AAA @ gmail.com ', 'AAA '); $ mail-> addTo ('XXX @ qq.com ', 'Mr xxx'); $ mail-> send ($ mailTransport );