从codeigniter发送多封电子邮件 [英] Sending multiple email from codeigniter
本文介绍了从codeigniter发送多封电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,我在codeigniter创建通讯。有没有办法发送多个电子邮件与CI电子邮件lib或应该使用第三方?
Hi friends i am creating newsletter in codeigniter. Is there a way to send multiple email with CI email lib or should i use third party ?
推荐答案
使用电子邮件类,例如:
Using the Email Class, something like:
foreach ($list as $name => $address)
{
$this->email->clear();
$this->email->to($address);
$this->email->from('your@example.com');
$this->email->subject('Here is your info '.$name);
$this->email->message('Hi '.$name.' Here is the info you requested.');
$this->email->send();
}
(直接从文档)。这取决于您拥有多少个地址,以及任何约束,例如服务器/邮件队列处理/脚本超时等。
would work. (Straight from the docs). It depends on how many addresses you have, and any constraints such as server/mail queue processing/script time out etc
我不知道第三方CI通讯插件/图书馆,但我没有看得太硬。
I'm not personally aware of a 3rd party CI newsletter plugin/library but i haven't looked too hard.
这篇关于从codeigniter发送多封电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文