//比如 在控制器用 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的更多相关文章

  1. 利用CodeIgniter中的Email类发邮件

    CodeIgniter拥有功能强大的Email类.以下为利用其发送邮件的代码. 关于CI的Email类的详情请参考:http://codeigniter.org.cn/user_guide/libra ...

  2. CI框架Email类发送邮件提示Unable to send data: . The following SMTP error was encountered: Unable to .......

    最近服务器迁移,然后CI框架做的项目发邮件全挂掉了,刚开始是25端口没开,然后开了正好还是有问题, 1.打印请求信息和返回信息 echo $this->email->print_debug ...

  3. py2exe使用方法 (含一些调试技巧,如压缩email 类)(转)

    一.简介 py2exe是一个将python脚本转换成windows上的可独立执行的可执行程序(*.exe)的工具,这样,你就可以不用装python而在windows系统上运行这个可执行程序. py2e ...

  4. py2exe使用方法 (含一些调试技巧,如压缩email 类)

    http://justcoding.iteye.com/blog/900993 一.简介 py2exe是一个将python脚本转换成windows上的可独立执行的可执行程序(*.exe)的工具,这样, ...

  5. CI 模板解析器类

    模板解析器类可以解析你的视图文件中的伪变量.它可以解析简单的变量或者以变量作为标签的结构.如果你以前没有用过模板引擎,那么伪变量如下所示: <html><head><ti ...

  6. CI框架中一个类中调用另一个类中已经加载对象测试

    controller.php <?php class CI_Controller { private static $instance; public function __construct( ...

  7. PHP CI框架email类发送邮件

    用CI框架发送邮件类 在中文标题太长的情况下会出现乱码,搜索后说是发送邮件的时候有标题长度的限制,按说的方法修改后,还是没能得到解决,后来发现需要转换邮件标题的编码,解决方法如下: 打开 librar ...

  8. 利用Velocity结合Spring发email

    在spring中发mail是一件容易的事,如果利用Velocity做mail的模板来发送就更得心应手了. 首先,还是简单描述sping中的配置,发mail需要一个mail的engin: <bea ...

  9. 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 ...

随机推荐

  1. C++ 运行时类型识别 知道实例父类类型,显示出子类类型

    typeid(nets_[i]).name() 其中的nets_[i]是一个对象

  2. [Javascript] Drawing Paths - Curves and Arcs

    window.onload = function() { var canvas = document.getElementById("canvas"), context = can ...

  3. linux shell read command-Getting User Input Via Keyboard--ref

    ref:http://bash.cyberciti.biz/guide/Getting_User_Input_Via_Keyboard You can accept input from the ke ...

  4. secureCRT常用设置

    一.快捷键: 1. ctrl + a : 移动光标到行首[常用] 2. ctrl + e :移动光标到行尾[常用] 3. ctrl + d :删除光标之后的一个字符 4. ctrl + w : 删除行 ...

  5. virtualization-vs-containerization

    http://containerz.blogspot.com/2015/03/virtualization-vs-containerization.html Virtualization vs. Co ...

  6. 亿能测试白盒安全测试模板V1.0发布

    亿能测试白盒安全测试模板V1.0发布http://automationqa.com/forum.php?mod=viewthread&tid=2911&fromuid=21

  7. [Form Builder]Form中的validate验证事件

    转:http://yedward.net/?id=70 Form的validate行为可以由一个总的form级别的validation属性来控制,可以通过set_form_property来设置成PR ...

  8. AWS 命令行界面 + Python 的 AWS 开发工具包 (Boto3)

    安装AWS CLI $ pip install awscli 安装Boto3 $ pip install boto3 设置AWS CLI $ aws configure AWS Access Key ...

  9. ERROR 1114 (HY000): The table 'adv_date_tmp' is full(Mysql临时表应用)

    场景:需要对现在数据库的数据进行批量的进行is_del=1的操作,但是遇到一个问题,在执行sql的时候发现sql不能在查询特定表的时候再嵌套查询来做update的操作,经过讨论,后续我们想到用临时表的 ...

  10. CentOS 6.3 安装ATI显卡驱动

    环境: centos 6.3  内核(GNU貌似大家都知道) 显卡:ATI Mobility Radeon HD 3470 安装显卡流程: 1.官网下载最新驱动 http://support.amd. ...