$config = array('auth' => 'login',
'username' => '****@gmail.com',
'password' => '****',
'port' => '25',
'ssl' => 'tls');
$transport = new Zend_Mail_Transport_Smtp('smtp.googlemail.com', $config);
那之后我该怎么办,我可以把正文和收件人地址放在哪里.
what should i do after that, where can i put the body and the recipient address.
在Zendframework
Zend_Mail::setDefaultTransport($transport);
然后在其他地方实例化 Zend_Mail
,编写您的邮件并发送.
Then somewhere else instanciate Zend_Mail
, write your mail and send it.
这篇关于在 Zend 框架上通过 SMTP 发送电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!