Estoy usando la biblioteca de correo electrónico de codeigniter. Este código envía correctamente el correo a $to variable.pero no a $cc y $bcc . ¡Por favor, ayúdenme si alguien pudiera!
$this->load->library('email'); $this->email->from($from); $this->email->bcc($bcc); $this->email->cc($cc); $this->email->to($to); $this->email->subject($subject); $this->email->message($content); $this->email->send();Estás equivocado en el código, usa una matriz en BCC.
$this->email->bcc(array($this->input->post('bcc_email')));Utilice esta biblioteca:
$this->load->library('email');luego usa este código, está trabajando a mi lado:
$this->email->from('your@example.com', $this->input->post('fullname')); $this->email->to($this->input->post('email')); $this->email->cc($this->input->post('cc_email')); $this->email->bcc($this->input->post('bcc_email')); $this->email->subject('Registeration Notification'); $this->email->message('You have registered successfully.\nYour username is :'.$this->input->post('email')); $this->email->send();