Problem with custom e-mail headers in CEmailLogRoute

Hi to all!

I see a strange behavior of CEmailLogRoute.

Here is my config:



                    'levels'=>'error, warning, info',



                        'Content-Type'=>"text/plain; charset=UTF-8",




And E-mail I receive has not such headers, but values are added to the letter’s body like this:

text/plain; charset=UTF-8


2012/08/20 10:12:12 [error] [exception.CHttpException.404] exception...

Any help will be appreciated )

Yii 1.1.10

Which Mail Transport Agent are you using on that system?

As stated in php mail() api doc there are some MTAs that convert \n to \r\n even if there is already \r\n in the mail header and so they break the header.


I’m using Exim but I have solved my problem ) Headers array should looks like:


    'Content-Type: text/plain; charset=UTF-8',

    'TestHeader: TestValue'


I think that in documentation is not stated clearly about this issue.