bcc() public method

Set BCC
public bcc ( $bcc, $limit = '' ) : CI_Email
return CI_Email
Example #1
0
 protected function send_email($to, $subject, $text)
 {
     $this->load->library('email');
     $this->email->from(MAIL_FROM_ADDRESS, MAIL_FROM_NAME);
     $this->email->bcc($to);
     $this->email->bcc_batch_mode = true;
     $this->email->subject($subject);
     $this->email->message($text);
     $this->email->batch_bcc_send();
     return $this->email->send();
 }
 public function bcc($bcc, $limit = '')
 {
     if ($this->mailer_engine == 'phpmailer') {
         $bcc = $this->_str_to_array($bcc);
         $names = $this->_extract_name($bcc);
         $bcc = $this->clean_email($bcc);
         if ($this->validate) {
             $this->validate_email($bcc);
         }
         reset($names);
         foreach ($bcc as $address) {
             list($key, $name) = each($names);
             $this->phpmailer->addBCC($address, $name);
         }
     } else {
         parent::bcc($bcc, $limit);
     }
     return $this;
 }