Search code examples
codeigniteremailbcc

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 = "[email protected]";

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

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

        $this->email->from('[email protected]', '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!


Solution

  • 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.