I need to send email to multiple users provided with cc using CI. My code is as shown below: This below code worked for sending email for single user but i need to send same message to multiple user at a same time..
$this->load->library('email', $config);
$to = 'User email address here';
$subject = 'Alert information On Products';
$message = "Dear user,Our new product has been launched.Please visit our site for more informations";
$this->load->library('email');
// from address
$this->email->from('admin_email_address');
$this->email->to($to); // to Email address
$this->email->cc('email_address_one');
$this->email->subject($subject); // email Subject
$this->email->message($message);
$this->email->send();
try to use , seperated email in $this->email->cc function like this .
$this->email->cc('[email protected],[email protected],[email protected]');
you can also use like this
$this->email->to('[email protected], [email protected], [email protected]');
for email reference follow the link Here