Hello. I am getting a strange PHP error when using Email Class.
In the email I am sending I have specified the Subject, after sending email arrives with the subject I’ve specified, yet I am getting this error on the web page when I fire-up the function:
Check your controller file have you set the index, of subject in there, it has to be set otherwise the error will keep appearing, even if it is an empty index ’ ‘.
If you mean by index : $this->email->subject(’‘) .. sure!! I just told, I am receiving the email with the subject! so I have it like this: $this->email->subject($msg_subject) ..
Here is the function I am using : http://paste.mycodenow.com/view/27790c69
I am currently discussing that in IRC #codeigniter.
If you don’t ever call subject(), then yes, you will probably see an error from line 930. Odd that the class doesn’t do a check first (I don’t think Subject is a required email header, is it?)
Hey Colin,
I am hitting the exact same error on the same line (930). To recreate the problem - try sending to a group of 90+ email addresses - that is when I see it happen. The first 30 or so get sent out fine, with the Correct Subject showing, but then not only does the Subject disappear and errors start getting thrown, but also the HTML body gets garbled.
See these two screengrabs, both the same message, both sent in the same batch.
Good HTML Email received: http://i285.photobucket.com/albums/ll64/jrlooney/Picture3-1.jpg
Garbled HTML Email received: http://i285.photobucket.com/albums/ll64/jrlooney/Picture4-1.jpg
“Error” output by CI: http://i285.photobucket.com/albums/ll64/jrlooney/Picture5.jpg
NOTE - if i change the protocol setting in the config from mail to sendmail, the “Subject” problem goes away, however the HTML is still getting garbled
Can you think of a way I can troubleshoot this w/o sending out the messages, and somehow seeing the values CI is trying to use for each block of 20 messages before it sends them to sendmail (any way to see if it’s a CI problem or a sendmail problem)?
It appears to be related to
bcc_batch_mode
&
bcc_batch_size
I was sending to 90 email addresses and getting the errors described, this was when bcc_batch_size was set to 20. I just changed it to 100 and all 90 messages went out fine.
Can someone from CodeIgniter please look into it and help me understand a fix, or let me know if it’ll just have to be logged as a bug and taken care of in the next release?
I’m having the exact same problem. To test, I generated a list of 100+ bogus email addresses at my own domain, and inserted a real address (of my own) at various points within the list.
We discovered this problem by sending out a 3000+ email blast, so I’m hoping my bogus address trick will be sufficient for testing.
I originally followed this thread, thinking the HTML was the problem. I corrected my emails to make them entire pages including HTML, HEAD, and BODY tags.
I was sending to 90 email addresses and getting the errors described, this was when bcc_batch_size was set to 20. I just changed it to 100 and all 90 messages went out fine.
Can someone from CodeIgniter please look into it and help me understand a fix, or let me know if it’ll just have to be logged as a bug and taken care of in the next release?
This thread (and the problem) is more than a year old. Is anybody from EllisLab even willing to acknowledge the bug? Is there a solution that appeared somewhere in the meantime?