简体   繁体   中英

codeigniter bcc doesn't work

Codeigniter "bcc" doesn't work, But the same code with "to" works just fine! Any suggestions why this happens and how to fix it?

Here's my code:

        $email = "myEmail@myWebsite.com";

        $subject = "my subject";
        $message = "my message";

        $this->email->set_mailtype("html"); // In my actual code this is needed

        $this->email->from('myWebsiteEmail@myWebsite.com', 'Info');
        // $this->email->to($email); // It works with this code
        $this->email->bcc($email); // It doesn't work with this code

        $this->email->subject($subject);
        $this->email->message($message);

        $this->email->send();

Any suggestions would be appreciated!

You have to have a to to be able to bcc

Try adding an email to the to as well as a bcc and it should work.

You may need to enable bcc_batch_mode in email config. By default is value is FALSE.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM