在zend框架上通过SMTP发送电子邮件 [英] Sending email via SMTP on zend framework

查看:82
本文介绍了在zend框架上通过SMTP发送电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

$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

Its described in the manual of Zendframework

Zend_Mail::setDefaultTransport($transport);

然后在其他地方instanciate Zend_Mail ,写你的邮件并发送。

Then somewhere else instanciate Zend_Mail, write your mail and send it.

这篇关于在zend框架上通过SMTP发送电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆