A Subscribe2 user, Beth has recently done a good deal of troubleshooting with her host to resolve some email sending issues she was having.
I have been asked to make this information more widely available as a possible solution to others – which makes perfect sense to me 🙂
If you are finding that your outgoing emails are arriving at your Inbox and also that of the first recipient in the BCC Header, but that no other users are getting your email notifications this solution may help you.
First, an explanation of how the plugin constructs the BCC header. RFC822 standards state that the BCC header line can only occur once, cannot be more than 998 characters long and can wrap. The easiest way for the plugin to accomplish this is to add each BCC recipient onto a new line for the BCC header line.
The solution is to stop the wrapping on certain server setups, but you must ensure that your BCC header is not longer than 998 characters.
To do this, find all lines in the code as follows:
(” == $bcc) ? $bcc = “Bcc: $recipient” : $bcc .= “,\r\n $recipient”;
And change them to:
(” == $bcc) ? $bcc = “Bcc: $recipient” : $bcc .= “,$recipient”;
Note the removal of “\r\n”.
Finally, you’ll have to change the BCCLIMIT setting at the top of the code to ensure that the BCC line is not longer than 998 characters. Assuming that an email address would be 50 characters long a setting of 15 should allow ample space.
This may be arising because the PHP mail() function is not correctly parsing the BCC header over wrapped lines when passing the email directly to an SMTP server. You are welcome to try this fix but I feel that my interpretation of the RFC822 standards is valid and correct. The main code base will not be changing and this post is provided only as a possible solution.