在CI框架中如何发送email?
2016-04-26 14:07
211 查看
public function sendemail() { $config = array('protocol'=>'smtp', 'smtp_host' => 'smtp.163.com', 'smtp_user' => '邮箱的用户名', 'smtp_pass' => '自身邮箱密码', 'smtp_port' => '25', '_smtp_auth' => TRUE, 'wordwrap' => TRUE, 'charset' => 'iso-8859-1' ); $this->load->library('email', $config); $this->email->from('用户邮箱@163.com', '用户'); $this->email->to('发送到哪个邮箱@163.com'); $this->email->subject('文件标题'); $this->email->message('文件内容'); $this->email->send(); }
相关文章推荐
- SendKeys.SendWait
- LightOJ 1138 Trailing Zeroes (III)
- View结合组策略进行应用程序下发
- [LintCode] Reverse Pairs 翻转对
- raise RuntimeError("autoconf error") RuntimeError: autoconf error
- MailMessage+SmtpClient 发送邮件
- DAY6:leetcode #11 Container With Most Water
- linker command failed with exit code 1 (use -v to see invocation)错误调试
- cpu_relax( )-----对自选循环等待(spin-wait loops)操作的优化【转】
- mac os 终端提示 you have new mail
- 人工智能对战游戏程序会怎样?奥创大战贾维斯吗!
- UVA 818 Cutting Chains
- postmain 导致浏览器两次请求
- LintCode: Paint House II
- (整理)IIS 7 503 "service unavailable" errors
- AD的一些信息
- paintEvent调用时机
- LogCat里的错误提示 FATAL EXCEPTION: main
- LintCode:Paint House
- HDU 2476 String painter 区间dp