EllisLab/CodeIgniter — pull request #1415 by mickeywu (2012-06-01 05:40:52+00:00)
Title: Made set_header() public in Email library and updated documentation.

I believe it would provide more flexibility to developers by enabling the use of set_header() in the Email library, where they can add additional headers to e-mails. This is achieved by simply changing the modifier of set_header() in Email.php from "protected" to "public" to expose access. I also updated the documentation to reflect this.

I have personally ran into this several times in applications I developed, where I needed to add an additional e-mail header to circumvent a problem. For example, our workplace uses Microsoft Outlook / Exchange and employees can set out-of-office messages. However, Exchange does not respect the "reply-to" header and will always send the out-of-office messages using "to". To work around this problem, adding a header called "Precedence: bulk" will tell Exchange not to send out-of-office messages for that particular e-mail.