Ugly fix for empty subject in CodeIgniter batch e-mail sending

This has happened to me a lot when trying to send batch e-mails using CodeIgniter 2.x. The first e-mail sent has the subject setup ok but the rest of the e-mails are sent with an empty subject.

As of version 2.1.3 this problem has not yet been fixed.

Here’s an ugly fix for this problem:

Go to line 978 of “system/libraries/Email.php” and comment it out. It should look like this:

// unset($this->_headers['Subject']);

The line is located inside the _write_headers() function.

There are no comments yet, add one below.

Leave a Comment

Your email address will not be published. Required fields are marked *