Codeigniter实现发送带附件的邮件
程序员文章站
2022-05-25 14:30:26
本文实例讲述了codeigniter实现发送带附件的邮件的方法。分享给大家供大家参考。具体分析如下:
attach() 方法允许你的发邮件时带上附件,下面是演示代码
复...
本文实例讲述了codeigniter实现发送带附件的邮件的方法。分享给大家供大家参考。具体分析如下:
attach() 方法允许你的发邮件时带上附件,下面是演示代码
复制代码 代码如下:
$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程序设计有所帮助。