从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.