ci 用本身 email 类发 email
//比如 在控制器用 email 方法发送邮件
//用126的smtp 发送,示例邮件为 myemail@126.com 密码为 password
public function email()
{
$config = array('protocol'=>'smtp',
'smtp_host' => 'smtp.126.com',
'smtp_user' => 'myemail',
'smtp_pass' => 'password',
'smtp_port' => '',
'_smtp_auth' => TRUE,
'wordwrap' => TRUE
);
$this->load->library('email', $config); // 具体参数看手册
$this->email->from('myemail@126.com', 'myemail');
$this->email->to('000000@qq.com');
$this->email->cc('0000@qq.com');
$this->email->bcc('0000@163.com'); $this->email->subject('php ci subject');
$this->email->message('php ci message');
$this->email->send(); print_r($this->email->print_debugger());
}
ci 用本身 email 类发 email的更多相关文章
- 利用CodeIgniter中的Email类发邮件
CodeIgniter拥有功能强大的Email类.以下为利用其发送邮件的代码. 关于CI的Email类的详情请参考:http://codeigniter.org.cn/user_guide/libra ...
- CI框架Email类发送邮件提示Unable to send data: . The following SMTP error was encountered: Unable to .......
最近服务器迁移,然后CI框架做的项目发邮件全挂掉了,刚开始是25端口没开,然后开了正好还是有问题, 1.打印请求信息和返回信息 echo $this->email->print_debug ...
- py2exe使用方法 (含一些调试技巧,如压缩email 类)(转)
一.简介 py2exe是一个将python脚本转换成windows上的可独立执行的可执行程序(*.exe)的工具,这样,你就可以不用装python而在windows系统上运行这个可执行程序. py2e ...
- py2exe使用方法 (含一些调试技巧,如压缩email 类)
http://justcoding.iteye.com/blog/900993 一.简介 py2exe是一个将python脚本转换成windows上的可独立执行的可执行程序(*.exe)的工具,这样, ...
- CI 模板解析器类
模板解析器类可以解析你的视图文件中的伪变量.它可以解析简单的变量或者以变量作为标签的结构.如果你以前没有用过模板引擎,那么伪变量如下所示: <html><head><ti ...
- CI框架中一个类中调用另一个类中已经加载对象测试
controller.php <?php class CI_Controller { private static $instance; public function __construct( ...
- PHP CI框架email类发送邮件
用CI框架发送邮件类 在中文标题太长的情况下会出现乱码,搜索后说是发送邮件的时候有标题长度的限制,按说的方法修改后,还是没能得到解决,后来发现需要转换邮件标题的编码,解决方法如下: 打开 librar ...
- 利用Velocity结合Spring发email
在spring中发mail是一件容易的事,如果利用Velocity做mail的模板来发送就更得心应手了. 首先,还是简单描述sping中的配置,发mail需要一个mail的engin: <bea ...
- Send email alert from Performance Monitor using PowerShell script (检测windows服务器的cpu 硬盘 服务等性能,发email的方法) -摘自网络
I have created an alert in Performance Monitor (Windows Server 2008 R2) that should be triggered whe ...
随机推荐
- 七行jquery代码实现图片渐变切换【兼容ie6+、 Chrome、 Firefox】
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- Webview 中 Javascript 无法调用 Java 对象
[问题产生] Webview 通过 addjavascriptInterface 传递对象给前端,一切正常.但是 Android官方已提醒此功能是有安全风险,改用 safe-java-js-webvi ...
- WinForm简单多国语言实现
参考:http://minmin86121.blog.163.com/blog/static/4968115720119259151898/ http://www.cnblogs.com/hakuci ...
- Cocos2d-x 2.0 自适应多种分辨率
转自:http://dualface.github.io/blog/2012/08/17/cocos2d-x-2-dot-0-multi-resolution/ cocos2d-x 2.0 提供一个极 ...
- mysql 索引优化
http://blog.jobbole.com/87107/ http://www.phpben.com/?post=74 http://blogread.cn/it/article/4088?f=s ...
- 硬菜点播台 | MySQL阿里实践经典案例之参数调优最佳实践
http://mp.weixin.qq.com/s?__biz=MzA4NjI4MzM4MQ%3D%3D&mid=512708319&idx=1&sn=6af5f424d7cd ...
- vim的一些高级配置
今天有幸看到一篇博文,有一些vim的高级配置 在linux或者unix下面的.vimrc文件中,在其中可以添加如下片段,可以实现解释上面你说的那些高级用法 " Ctrl + K 插入模式下光 ...
- Default route and zero route
A default route of a computer that is participating in computer networking is the packet forwarding ...
- hdu1753java(大数相加)---BigDecimal类
大明A+B Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submissi ...
- HDU2076
夹角有多大(题目已修改,注意读题) Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others ...