I am using Email library of codeigniter. This code is properly sending mail to $to variable.but not to $cc and $bcc. Please help me if anybody could!
$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();
Youre wrong the code, use an array on BCC.
$this->email->bcc(array($this->input->post('bcc_email')));
Use this library:
$this->load->library('email');
then use this code, its working at my side:
$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();