phpci发送邮件
2015-08-21 14:17
561 查看
$config['protocol']='smtp';
$config['smtp_host']='smtp.163.com';//163服务器,之前用了qq服务器死活发不出去,不知道什么原因,可以自己探索
$config['smtp_user']='18730261183@163.com';//你的邮箱账号
$config['smtp_pass']='mima';//你的邮箱密码
$config['smtp_port'] = 25;//端口
$config['wordwrap'] = TRUE;
$config['mailtype'] = 'html';
$config['charset'] = 'utf-8';
$config['priority'] = 1;
$config['validate'] = TRUE;
$this->load->library('email');
$this->email->initialize($config);
//$this->email->from($_POST['sendfrom'],'我是发件人') //发件人 $this->email->to($_POST['sendto']);//收件人 $this->email->subject($_POST['topic']);//主题 $this->email->message($_POST['content']);//正文
$this->email->from('18730261183@163.com', '');
$this->email->to('wen1750686723@qq.com');
// $this->email->cc('another@another-example.com');
// $this->email->bcc('them@their-example.com');
$this->email->subject('ceshi');
$this->email->message('Testing the email class.');
$this->email->send();
$config['smtp_host']='smtp.163.com';//163服务器,之前用了qq服务器死活发不出去,不知道什么原因,可以自己探索
$config['smtp_user']='18730261183@163.com';//你的邮箱账号
$config['smtp_pass']='mima';//你的邮箱密码
$config['smtp_port'] = 25;//端口
$config['wordwrap'] = TRUE;
$config['mailtype'] = 'html';
$config['charset'] = 'utf-8';
$config['priority'] = 1;
$config['validate'] = TRUE;
$this->load->library('email');
$this->email->initialize($config);
//$this->email->from($_POST['sendfrom'],'我是发件人') //发件人 $this->email->to($_POST['sendto']);//收件人 $this->email->subject($_POST['topic']);//主题 $this->email->message($_POST['content']);//正文
$this->email->from('18730261183@163.com', '');
$this->email->to('wen1750686723@qq.com');
// $this->email->cc('another@another-example.com');
// $this->email->bcc('them@their-example.com');
$this->email->subject('ceshi');
$this->email->message('Testing the email class.');
$this->email->send();
相关文章推荐
- windows下PHP环境的搭建
- 五种常见的 PHP 设计模式
- PHP正则匹配替换图片地址
- php+ci对mysql进行增删改查
- YII使用PHPExcel导入Excel文件的方法
- Yii: 扩展CGridView增加导出CSV功能
- thinkphp3.2 删除Runtime目录里的缓存文件,标记一下,以下好找。
- thinkphp3.2 删除Runtime目录里的缓存文件,标记一下,以下好找。
- php进行多个数组合并zip
- PHP的Yii框架的基本使用示例
- 大约laravel错误的解决方案
- 解决php中截取字符串的中文乱码问题
- php配置项-安全模式
- (一)PagerAdapter、FragmentPagerAdapter、FragmentStatePagerAdapter的区别
- PHP的serialize序列化数据与JSON格式化数据
- 8个与php相关的函数
- YII中使用SOAP一定要注意的一些东西
- php抓取远程数据排序
- 方便的格式化OutputDebugString输出函数
- thinkphp开发技巧经验分享