BUG / Hotmail / phplist 3.2.3

I just upgrade phplist from to 3.0.12 to 3.2.3 and I have big issue on hotmail

phplist beak all my HTML code adding a “=” to break the line as:
from :

                        <td width=3D"460" valign=3D"middle" align=3D"left" class=3D"full"><a style=3D"color:#db306f;" href=3D"http://www.mydomainewebite00.com?utm_source=3Demail50&utm_medium=3Demail&utm_content=3Dtext&utm_campaign=3Doffrr-noel-ide" ><img width=3D"460" height=3D"88" class=3D"full" style=3D"text-decoration: none; display: block; font-size:3em;font-weight:700;color:#e0e0e0; background-color:#db306f;border-style:none;" src=3D"http:/

to

                        <td width=3D"460" valign=3D"middle" align=3D"left" =
class=3D"full"><a style=3D"color:#db306f;" href=3D"http://www.mydomainewebi=
te00.com?utm_source=3Demail50&utm_medium=3Demail&utm_content=3Dtext&utm_cam=
paign=3Doffrir-noel-ide" ><img width=3D"460" height=3D"88" class=3D"full" s=
tyle=3D"text-decoration: none; display: block; font-size:3em;font-weight:70=
0;color:#e0e0e0; background-color:#db306f;border-style:none;" src=3D"http:/=

And if almost all mail client understand this line break with “=”, hotmail. simply break the line.
And doesn display anything.

Not a bug, but a known issue with Hotmail/Outlook.com and easily fixed by amending define(“HTMLEMAIL_ENCODING”,“quoted-printable”); in your config/config.php file to 7-bit or 8-bit as detailed in the old forums.

At first I thought it wasn the proble but it is…

But It seem the previous solution of add in config file the line
define(“HTMLEMAIL_ENCODING”,“8bit”);
doesn’t work.

Because I still have in my config file.
define(“HTMLEMAIL_ENCODING”,“8bit”);

My email header Are:

	boundary="b1_36f5ab442d085ba7997718b57a3bda86"
Return-Path: contact@mydomain.com
X-OriginalArrivalTime: 23 Nov 2015 14:21:14.0341 (UTC) FILETIME=[35B2B150:01D125FA]

This is a multi-part message in MIME format.

--b1_36f5ab442d085ba7997718b57a3bda86
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

When previously the upgrade the header was

Content-Transfer-Encoding: 8bit
Return-Path: noreply@mydomain.com
X-OriginalArrivalTime: 22 Nov 2015 15:11:26.0132 (UTC) FILETIME=[0E73C740:01D12538]

--b1_c842e49d6a7478193673a99d96392bf1
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

So as you can see the Content-Transfer-Encoding: 8bit disapear.

The problem seems to come form phmailer 5.2.14 if i replace it by the old one (5.2.9) everything are ok.

@amsa There has been a change in phpmailer to do with long lines (> 1000 charactes). It now uses quoted-printable encoding even when a different encoding was specified with HTMLEMAIL_ENCODING, so that it can safely break the long line.
Does that appear to be the cause of your problem?

1 Like

@duncanc What can I tell you is the fact that I cannot display any of my html email in hotmail with phpmailer 5.2.14
If I remplace it by 5.2.9 the diplay are ok.

I cannot tell you if it’s this change of encoding for 8bit to quoted-printable, but I guess.

@amsa I meant to ask whether your html contains long lines. If it does then that is likely the reason for quoted-printable being used.

1 Like

That’s true my email contain long lines.

So that’s probably the reason why quoted-printable are used.

Furthermore I always get trouble with long html line.
But before only one element doesn display.

Now nothing is displaying.

So I did some test.

Sending the same HTML email with long line.

And If i modify the phpmailer in order to leave in 8bits and it’s work

Clsss.PHPMAILER 

public function createBody()
{
    [...]

    $this->setWordWrap();
    [...]
    /*J440 COMMENTING THIS PART IN ORDER TO SEND MESSAGE in 8bit.
    //If lines are too long, and we're not already using an encoding that will shorten them,
    //change to quoted-printable transfer encoding
    if ('base64' != $this->Encoding and self::hasLineLongerThanMax($this->Body)) {
        $this->Encoding = 'quoted-printable';
        $bodyEncoding = 'quoted-printable';
    }
    */
            [...]
    /* J440 COMMENTING THIS PART IN ORDER TO SEND MESSAGE in 8bit.       
    //If lines are too long, change to quoted-printable transfer encoding
    if (self::hasLineLongerThanMax($this->AltBody)) {
        $altBodyEncoding = 'quoted-printable';
    }
     */
    //If lines are too long, and we're not already using an encoding that will shorten them,
    //change to quoted-printable transfer encoding
    if ('base64' != $this->Encoding and self::hasLineLongerThanMax($this->Body)) {
        $this->Encoding = 'quoted-printable';
        $bodyEncoding = 'quoted-printable';
    }
    */

Everything are ok.

I also tried to only add to the config file:
define(“HTMLEMAIL_ENCODING”,‘base64’);
Which work also, but in this case the email are encoding as base64.

So I hesitate in the 2 solutions.
the 2nd one are so much easier to maintain.

You said that it works with the previous version of phpmailer, so you should use that rather than modify its code.
In your config file you can give the path to the version of phpmailer that you want to use.

# you can specify the location of the phpMailer class here
# if not set, the version included in the distribution will be used
## eg for Debian based systems, it may be something like the example below
## when you do this, you may need to run some tests, to see if the phpMailer version
## you have works ok
#define ('PHPMAILER_PATH','/usr/share/php/libphp-phpmailer/class.phpmailer.php');

The value needs to be the path to the file PHPMailerAutoload.php not class.phpmailer.php, e.g.

define ('PHPMAILER_PATH','/home/xxx/phpmailer/PHPMailerAutoload.php');

So you can copy the complete directory for phpmailer from the earlier version of phplist and continue to use that.

1 Like

Thanks but the previous version work at 100% on hotmail/ gmail. but on some other email client the long line make trouble.

So the best I could find now is:

  • modify PHPmailer5.2.14
    or
  • encoding on base64

Do you have any idea if encoding in case could impact deliver rate?

This are the result of Many test.

Test Send long line in 8Bit
All message are htmml message with long line >1000
Test on 3 main client Hotmail/Gmail/personnal serveur mail

Long line with PHPMailer 5.2.9 / 8bit
or
Long line with PHPMailer 5.2.14 Modify / 8bit

  • Hotmail/ gmail Ok
  • Personnal serveur / domain some image disappear??

Using 8 bits aren’t the good solution, first because it doesn’t respect norm, and some image are missing.
Even if it quiet easy to trick, as I only have to add some comment in my email in order to be sure the long-line break happen in

Test Send long line in quoted-printable
test 1 Long-line html message
Long line with PHPMailer 5.2.14 / quoted-printable

  • Gmail + personnal message ok
  • Hotmail display nothing and add "= " every where

test 2 Long-line html message very simple as:

<p>test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test</p>

Result:
Long line with PHPMailer 5.2.14 / quoted-printable

  • Gmail + personnal message ok
  • Hotmail add "= " every where

=
test test test test test test test t= est test test test test test test test test test test test test test test t= est test test test test test test test test test test test test test test t= est test test test test test test test test test test test test test test t= est test test test test test test test test test test test test test test t= est test test test test test test test test test test test test test test t= est test test test test test test test test test test test test test test t= est test test test test test test test test test test test test test test t= est test test test test test test test test test test test test test test t= est test test test test test test test test test test test test test test t= est test test test test test test test test test test test test test test t= est test test test test test test test test test test test test test test t= est test test test test test test test test test test test test test test t= est test test test test test test test test test test test test test test t= est test test test test test test test test test test test test test test t= est test test test test test test test test test test test test test test t= est test test test test test test test test test test test test test test t= est test test test test test test test test test test test test test test t= est test test test test test test test test test test test test test test t= est test test test test test test test test test test test test test test t= est test test test test test test test test test test test test test test t= est test test test test test test test test test test test test test test t= est test test test test test test test test test test test test test test t= est test test test test test test test test test test test test test test t= est test test test test test test test test test test test test test test t= est test test test test test test test test test test test test test test t= est test test test test test test test test test test test test test test t= est test test test test test test test test test test test test test test t= est test test test test test test test test test test test test test test t= est test test test test test test test test test test test test test test t= est test test test test test test test test test test test test test test t= est test test test test test test test test test test test test test test t= est test test test test test test test test test test test test test test t= est test test test test test test test test test test test test test test t= est test test test test test test test test test test test test test test t= est test test test test test test test test test test test test test test t= est test test test test test test test test test test test test test test t= est test test test test test test test test test test test test test test t= est test test test test test test test test test test test test test test t= est test test test test test test test test test test test test test test t= est test test test test test test test test test test test test test test t= est test test test test test test test test test test test test test test t= est test test test test test test test test test test test test test test t= est test test test test test test test test test test test test test test t= est test test test test test test test test test test test test test test t= est test test test test test test test test test test test test test test t= est test test test test test test test test test test test test test

Conclusion I don’t have any satisfying solution.
So I have to find Why if I send long line message with PHPlist 3.2.3 /phpmailer 5.2.14 (quoted-printable) my message couldn’t be display on hotmail.

p.s:
I tried To make new phplist install and still the same.

I don’t really have anything more to suggest to solve this.

For people who receive a bad email you can include a “view in browser” link, https://resources.phplist.com/plugin/viewbrowser

1 Like

Thanks.

I finaly found, by testing directly PHPMailer whithout PHPList.
And the problem was "Pop before SMTP"m configuration of the server.

Can we use PHPList with Pop Before sMTP?

I think we normally can’t send by pop-Before-SMTP through PHPList So i Added: in class.phpmailer.php

} elseif (defined('POPBEFORESMTP')) {
        $popuser = $GLOBALS['phpmailer_popuser'];
        $poppassword = $GLOBALS['phpmailer_poppassword'];
        $popserver = $GLOBALS['phpmailer_popserver'];

        $pop = new POP3();
        $pop->Authorise($popserver, 110, 30, $popuser, $poppassword, 1);


        $this->Host = $popserver;
        
        if (defined('POPBEFORESMTP_DEBUG') && POPBEFORESMTP_DEBUG != '')
        {
          $this->SMTPDebug = 2;
          //Ask for HTML-friendly debug output
          $this->Debugoutput = 'html';
        }
      $this->Mailer = "smtp";

      } else {

We had this same issue. I backed down the phpmailer version step by step

5.2.14
5.2.13
5.2.12
5.2.11
5.2.10

The issue happened until I got to 5.2.10. So for the time being the fix appears to be using PHPMailer version 5.2.10

Just to add to this topic, I’ve encountered the same problem when I upgraded from v.3.0.11 to v.3.2.4. My database was set to the proper to UTF-8 with collation utf8_general_ci but it seemed that the whole code was plagued with “equal signs” on output.

The only way I could resolve this after two hours of searching, was by uploading the entire old v3.0.11 PHPMailer directory to the present 3.2.4 version. That fixed it.

BTW, the phpmailer included in that version was Version 5.2.9.

Unfortunately, this will probably break on my next upgrade and I wish the right solution could be found. I don’t know if it’s because my database dates over 11 year (dagn, have I been using PHPlist this long?) and I should just start afresh (which would be a shame to loose all former version links).

Suggestions? Similar experiences?

@NatPHP There is an issue raised with phpmailer about this problem https://github.com/PHPMailer/PHPMailer/issues/606 that seems to indicate it is a problem specifically with Outlook and presumably other Microsoft clients.

You can try using an older version of phpmailer with the current version of phplist. Just put it somewhere outside of the phplist directory and add this line to your config file identifying the autoload file

define ('PHPMAILER_PATH', 'xxxx/PHPMailerAutoload.php'); 

In the same way you could try the phpmailer master version from Github.

Thanks a lot Duncan. Took me long enough to come back to you but while upgrading to 3.2.5, I applied your suggestion (linking to an older PHPmailer [v 5.2.9] located outside the phplist directory) and it seems to work. I guess I’ll know for real when I send out my next monthly newsletter on the 15th.

I took a look at the phpmailer master vesion on Github, but it’s 5.2.14 (which is the one giving problems), so I preferred to cut the testing short and apply your work around, while keeping an eye on the discussion on Github.

Thanks again.

Here using phplist 3.2.15 + phpmailer 5.2.16… the issue is still there D-:

The worst thing is when you have images for example, with long urls… so the images gets broken on hotmail, outlook, etc…

Switched to base64…