Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sending multiple email from codeigniter

Tags:

codeigniter

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 ?

like image 474
ktm Avatar asked Dec 09 '25 22:12

ktm


1 Answers

Using the Email Class, something like:

foreach ($list as $name => $address)
{
    $this->email->clear();

    $this->email->to($address);
    $this->email->from('[email protected]');
    $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

I'm not personally aware of a 3rd party CI newsletter plugin/library but i haven't looked too hard.

like image 50
Ross Avatar answered Dec 14 '25 19:12

Ross



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!