CodeIgniter Forums
Email library bug when only using BCC - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Email library bug when only using BCC (/showthread.php?tid=45838)



Email library bug when only using BCC - El Forum - 10-08-2011

[eluser]Ordos[/eluser]
When I was trying to send an email to a list of recipients and only using the BCC field the following error message shows up:

A PHP Error was encountered
Severity: Warning
Message: mail() expects parameter 1 to be string, array given
Filename: libraries/Email.php
Line Number: 1540

For some reason the $to variable is not imploded into a string but passed as an array.

I fixed this by writing this:
Code:
$this->email->to("");
$this->email->bcc($emails);

Instead of only using email->bcc($emails). Could you guys look into this bug?

http://www.jenssegers.be/blog/28/CodeIgniter-email-library-bug