This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » Extensions » eZ Newsletter » Bug in eZ Newsletter, HTML vs. plain...

Bug in eZ Newsletter, HTML vs. plain text email

Bug in eZ Newsletter, HTML vs. plain text email

Thursday 10 April 2008 5:22:01 pm - 1 reply

The newsletter emails are generated in the class eZNewsletter; the contenttype is set to 'sms' or 'multipart/related' (for HTML newsletters), but never to 'text/plain'. Apparently, it assumes that the contenttype for the eZNewsletterMail class is always 'text/plain'.

However, when the eZNewsletterMail is created, the contenttype is initially set to 'text/plain', but subsequently changed into the prefered contenttype from the site.ini - MailSettings - ContentType settings. So if this is set to text/html, eZNewsletterMail will default to text/html, and plain text mails will be sent with the 'ContentType: text/html' header and will be displayed without line breaks.

To fix the bug, edit classes/eznewslettermail.php, and comment out lines 81/82 (this refers to version 1.5.3)

//    if ( $ini->hasVariable( 'MailSettings', 'ContentType' ) )
//        $this->setContentType( $ini->variable( 'MailSettings', 'ContentType' ) );

Modified on Thursday 10 April 2008 5:24:14 pm by Harry Oosterveen

Thursday 09 April 2009 8:46:56 pm

I have the same problem, but using eZ 4.0.1 and eznewsletter 1.6. The eznewsletter.php looks different, missing the section you commented out.

I also get plain text-mails wihtout linebreaks, and my html-mails don't display at all. When I look at the message source, it looks something like this:

This message is in MIME format. Since your mail reader does not understandthis format, some or all of this message may not be legible.--200904091919911:12941:0Content-Type: text/html; charset=utf-8Content-Transfer-Encoding: 8bit<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html>    <head>        <meta http-equiv="content-type" content="text/html; charset=windows-1250">								    </head>    <body style="margin:0;padding:0; font-family: Verdana;">	  </body></html>--200904091919911:12941:0--


(Newsletter content was deleted to shorten the code)

Any experience on this issue?


You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from