Welcome Guest, Not a member yet? Register   Sign In
Multiple User Mail Send.
#4

If you need to send one identical e-mail to all 200 recipients, the bcc field is just fine. You can use a string or an array with all recipients.
PHP Code:
$this->email->bcc($recipients); 

If every recipient must get an e-mail with personalized information, then you should send the mails in a foreach loop, using an array.
Most times, I use a view file. I pass the variable information to the view and let the output being returned as a string.

PHP Code:
$this->load->library('email');
//$recipients is an array of objects or arrays (records)
Foreach($recipients as $mailto) {
 
   //$mailto is 1 record (object of array), containing e-mail address, name, etc.
 
   $message $this->load->view('massmail'$mailtoTRUE); 
 
   //now, $message is a string with the complete e-mail body.
 
   $this->email->to($mailto['address']);
 
   $this->email->subject('This e-mail is about...');
 
   $this->email->from('[email protected]');
 
   $this->email->message($message);
 
   $this->email->send();

Reply


Messages In This Thread
Multiple User Mail Send. - by Geetha - 07-01-2019, 02:18 AM
RE: Multiple User Mail Send. - by reactionstudio - 07-01-2019, 04:19 AM
RE: Multiple User Mail Send. - by mboufos - 07-01-2019, 06:18 AM
RE: Multiple User Mail Send. - by Wouter60 - 07-01-2019, 07:43 AM



Theme © iAndrew 2016 - Forum software by © MyBB