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

Hi all,

Please Give Me Suggestion to Send Mail Multiple User in Codeigniter,like queue mail in Codeigniter.

Now am using email library php mailer in Codeigniter ,  It's Working fine.

But I need to Send Mail Multiple User like 200 user at that time. How We Implement Multiple User Mail in Codeigniter.
Geetha
Reply
#2

So assuming you don't want to CC everyone in on the same email, you need to build your own mail queue if you want to send out the emails in batches. 

You could save the contents of the email along with to, subject etc.. into the database and then process the queue in batches on the server side using a cronjob. 

It would also be a bit faster for your users too as they aren't waiting for the next page to load while CI sends the emails out, especially if you want to send out 200.
Reply
#3

hello, 
put the emails in a string with comma like [email protected],[email protected] etc and use the bcc.

With bcc you will send 1 email to 200 emails and none of the 200 emails will know each other.

Now if you want to make 200 personal and different emails you have to send 1 by 1 :/
Reply
#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




Theme © iAndrew 2016 - Forum software by © MyBB