Codeigniter實現(xiàn)發(fā)送帶附件的郵件
更新時間:2015年03月19日 11:20:48 作者:work24
這篇文章主要介紹了Codeigniter實現(xiàn)發(fā)送帶附件的郵件的方法,涉及Codeigniter中attach方法的使用技巧,非常具有實用價值,需要的朋友可以參考下
本文實例講述了Codeigniter實現(xiàn)發(fā)送帶附件的郵件的方法。分享給大家供大家參考。具體分析如下:
attach() 方法允許你的發(fā)郵件時帶上附件,下面是演示代碼
復(fù)制代碼 代碼如下:
$this->load->library('email');
$this->email->from('w3@w3mentor.com', 'W3M');
$this->email->subject('Email Test with attachment');
$this->email->message('Testing the email class IN CODEIGNITER with attachment.');
$this->email->attach('/path/to/attachment1.jpg');
$this->email->send();
$this->email->from('w3@w3mentor.com', 'W3M');
$this->email->subject('Email Test with attachment');
$this->email->message('Testing the email class IN CODEIGNITER with attachment.');
$this->email->attach('/path/to/attachment1.jpg');
$this->email->send();
希望本文所述對大家基于Codeigniter的php程序設(shè)計有所幫助。
相關(guān)文章
TP框架實現(xiàn)上傳一張圖片和批量上傳圖片的方法分析
這篇文章主要介紹了TP框架實現(xiàn)上傳一張圖片和批量上傳圖片的方法,結(jié)合實例形式分析了TP框架圖片上傳操作相關(guān)原理、實現(xiàn)步驟及操作注意事項,需要的朋友可以參考下2020-04-04
layui框架實現(xiàn)文件上傳及TP3.2.3(thinkPHP)對上傳文件進(jìn)行后臺處理操作示例
這篇文章主要介紹了layui框架實現(xiàn)文件上傳及TP3.2.3對上傳文件進(jìn)行后臺處理操作,結(jié)合實例形式分析了layui框架結(jié)合thinkPHP進(jìn)行文件上傳與處理操作相關(guān)實現(xiàn)技巧,需要的朋友可以參考下2018-05-05
CI框架中數(shù)據(jù)庫操作函數(shù)$this->db->where()相關(guān)用法總結(jié)
這篇文章主要介紹了CI框架中數(shù)據(jù)庫操作函數(shù)$this->db->where()相關(guān)用法,結(jié)合實例分析了or_where()、where_in()、or_where_in()、where_not_in()及or_where_not_in()等函數(shù)的使用技巧,需要的朋友可以參考下2016-05-05

