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)文章
destoon切換城市后實現(xiàn)logo旁邊顯示地區(qū)名稱的方法
這篇文章主要介紹了destoon切換城市后實現(xiàn)logo旁邊顯示地區(qū)名稱的方法,針對不同城市建設(shè)分站的時候很適用,需要的朋友可以參考下2014-08-08php array_values 返回數(shù)組的值實例詳解
php array_values 函數(shù)用于返回數(shù)組中所有的值,注意該函數(shù)將為新數(shù)組建立數(shù)組索引,原來的文字索引將不存在。本文章向大家講解array_values函數(shù)的基本語法及使用實例,需要的朋友可以參考下2016-11-11