$this->load->library('email');
$config['protocol'] = 'smtp';
//发送给QQ用户,要显示中文用 'iso-8859-1'
$config['charset'] = 'iso-8859-1';
//发送给163用户,要显示中文用'gb2312'
//$config['charset'] = 'gb2312';
$config['mailpath'] = 'news/index';
$config['smtp_host'] = 'smtp.163.com';
$config['smtp_user'] = 'zhangzhaoyu0624@163.com';
$config['smtp_pass'] = 'zhangzhaoyu';
$this->email->initialize($config);
$this->email->from('zhangzhaoyu0624@163.com', 'zhangzhaoyu');
$this->email->to('245464918@qq.com');
//设置抄送
//$this->email->cc();
//设置暗送
//$this->email->bcc();
$this->email->subject("The test of CodeIgniter's sending mail");
$this->email->message('你好,这是张兆玉的测试程序。通过CodeIgniter成功发送的邮件,请勿回复。');
//路径需要使用绝对路径
$this->email->attach('D:/QCallServer/htdocs/CI/public/images/google.jpg');
if ($this->email->send()) {
echo 'success...';
} else {
echo 'failed...';
}
分享到:
相关推荐
主要介绍了Codeigniter发送邮件的方法,涉及Codeigniter实现邮件发送的技巧,非常具有实用价值,需要的朋友可以参考下
主要介绍了CodeIgniter使用smtp服务发送html邮件的方法,涉及CodeIgniter中email类的使用技巧,需要的朋友可以参考下
本文实例讲述了codeigniter发送邮件并打印调试信息的方法。分享给大家供大家参考。具体如下: 这里的codeigniter代码实现发送邮件并打印调试信息的功能,用codeigniter自带的邮件发送库发送邮件 $this->load->...
什么是CodeIgniter CodeIgniter是一个应用程序开发框架-一个工具包-适用于使用PHP构建网站的人们。 它的目标是通过提供一组用于执行常见任务的库以及一个简单的界面和逻辑结构来访问这些库,从而使您比从头开始编写...
PHP框架之CodeIgniter留言板实例PHP框架之CodeIgniter留言板实例PHP框架之CodeIgniter留言板实例PHP框架之CodeIgniter留言板实例PHP框架之CodeIgniter留言板实例PHP框架之CodeIgniter留言板实例PHP框架之CodeIgniter...
codeigniter3-translations, CodeIgniter系统消息的翻译 系统消息的翻译这里项目包含对CodeIgniter系统邮件文件夹的翻译,system/language/english 。 变更日志已经添加到存储库中,因此你可以跟踪正式版本之间的...
CodeIgniter最新版本,开源、免费、轻量级的web编程,基于MVC的编程架构能大大提高php编码生产力。
从php codeigniter发送Bot消息到电报 步骤1 :在电报中搜索“僵尸”并输入 第2步:发送消息“ / newbot” 步骤3 :因此,它将询问机器人名称,然后输入机器人名称(例如:“ telegram_bot_message”),然后询问...
主要介绍了Codeigniter实现发送带附件的邮件的方法,涉及Codeigniter中attach方法的使用技巧,非常具有实用价值,需要的朋友可以参考下
CodeIgniter框架
codeigniter 代码实例分享,基于jquery1.4,codeigniter,eclipse 开发
敏捷php开发框架CodeIgniter 1.7.1中文手册
CodeIgniter_2.1.4.zip
在CodeIgniter里面使用它内置的邮件类发送邮件 $this->load->library('email'); $to = "aa@bb.cc"; $subject = "test"; $message = "hello!"; $config["protocol"] = "smtp"; $config["smtp_host"] = "smtp.163....
CodeIgniter 架构 教程. CodeIgniter 架构的使用说明教程.
codeigniter分页