Strange HTML formatting

Once you've installed phpList Version 2... ask questions here!
Forum rules
Please help the volunteers to help you by supplying the version of phpList you are using, browser & version and if possible, a link to your phpList installation. This is for Version 2 of phpList (the orange one).

Strange HTML formatting

Postby AntonD » 2:13pm, Tue 04 Jun, 2013

Hi Guys

So after long time use of v10, we had to move to another Linux machine, and I decided we try out v11 while we are at it. Everything seems OK - we are just getting the strangest output in the html version of the mail, eg: (just some text we used for demo purpose)

Code: Select all
Hey everyone!

First of Welcome to the Do Gaming League DOTA 2 Winter Leg!!=

Well done to all the teams that have made it to the Winte= r Leg Premier Division. All the teams have been practicing hard and we are = looking forward to see what you guys have on offer this season.

Just a few things to remember over the duration of the Winter Leg:

• Captains please make sure that all your players ha= ve read both the General Gaming Rules as well as the DOTA 2 rules and fully= understand them. (if you have any queries about the rules please get in to= uch with us)

• Make sure to organize your matches = ahead of time to avoid any penalties! here is a guide you can follow when o= rganizing your matches - Guidelines on how to correctly arrange your matche= s.


Notice all the "=" it is inserting. When using markup, it completely messes everything up as you could imagine.

Any idea why this is happening?

Thank you in advance!

edit: Forgot to mention - we are using 2.11.10, on a centos box
AntonD
phpList newbie
 
Posts: 3
Joined: 2:05pm, Tue 04 Jun, 2013

Re: Strange HTML formatting

Postby AntonD » 9:50am, Thu 06 Jun, 2013

So after 2 days of struggling...

I noticed that when using exchange to do the sending, rather than postfix , the mail would for some reason come out perfectly fine. I compared the source of the 2 mails and found that the working email <head> was formed like this:
Code: Select all
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

and the broken email like this:
Code: Select all
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta content="text/html;charset=UTF-8" http-equ="iv=&quot;Content-Type&quot;">


It seems that as soon as the mail client (Outlook and iOS mail at least) starts reading the second meta definition, things start going haywire.

So, I modified the following to get it working:

In /admin/sendemaillib.php on line 673 I changed:

Code: Select all
    $htmlmessage = '<head>
        <meta content="text/html;charset='.$cached[$messageid]["html_charset"].'" http-equiv="Content-Type">
        <title></title>'.$defaultstyle.'</head>'.$htmlmessage;
  }


to
Code: Select all
$htmlmessage = '<head><title></title>'.$defaultstyle.'</head>'.$htmlmessage;
  }


Afterwards I noticed that in the PHPMailler class, there are also definitions of encoding, which is probably why it is applied twice?

Hope this of some help to someone
AntonD
phpList newbie
 
Posts: 3
Joined: 2:05pm, Tue 04 Jun, 2013

Re: Strange HTML formatting

Postby AntonD » 7:56am, Fri 07 Jun, 2013

Sorry - Ignore the above. Forgot to change the smtp host back to the postfix box, and was still broken after setting the correct host.

The "Wrap" setting in config.php did however fix it...

cheers
AntonD
phpList newbie
 
Posts: 3
Joined: 2:05pm, Tue 04 Jun, 2013


Return to Question & Problems - after installing

Who is online

Users browsing this forum: No registered users and 5 guests