我需要使用CI将电子邮件发送给cc提供的多个用户。我的代码如下所示:此下面的代码适用于为单个用户发送电子邮件,但我需要同时向多个用户发送相同的消息。
$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();
尝试在$ this-> email-> cc这样的函数中使用分隔的电子邮件。
$this->email->cc('[email protected],[email protected],[email protected]');
你也可以这样使用
$this->email->to('[email protected], [email protected], [email protected]');
如需电子邮件参考,请点击此处的链接
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句