Home  >  Article  >  php教程  >  Codeigniter实现发送带附件的邮件

Codeigniter实现发送带附件的邮件

WBOY
WBOYOriginal
2016-06-13 09:11:08849browse

Codeigniter实现发送带附件的邮件

 这篇文章主要介绍了Codeigniter实现发送带附件的邮件的方法,涉及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();

 

希望本文所述对大家基于Codeigniter的php程序设计有所帮助。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn