View Issue Details

IDProjectCategoryView StatusLast Update
0006468OXID eShop (all versions)4.03. 3rd party librariespublic2019-03-26 15:47
Reportervanilla thunder 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version4.9.9 / 5.2.9 
Target VersionFixed in VersionNext Minor Version 
Summary0006468: PHPMailer 5.2.14 + Microsoft Exchange = corrupt email body
DescriptionThere is a problem with this particular version of PHPMailer.
Mails sent to Exchange Server without base64 encoding will arrive broken.

This affects every client connecting to exchange server:
outlook, android gmail client, android exchange app, iphone, OWA, firebird

PHP Version does not matter here, we have two 4.9 Shops (PE and CE) with different php versions hosted on profihost server, and we can always reproduce this bug in both shops.

Link to PHPMailer bug 0000751
https://github.com/PHPMailer/PHPMailer/issues/751
Steps To Reproduce1) find someone with an exchange server
2) create an account with email address hosted on this exchange server
3) place order
4) if it "works", you will see random visible html tags in your email and broken layout
Additional Informationthe easiest solution would be adding base64 encoding to the constructor:
$this->set('Encoding','base64');

I have created a module for our shops to fix that:
https://github.com/vanilla-thunder/fix-phpmailer

On 30th July I already had a short conversation with Keywan Ghadami about this bug, but back then we thought this bug would affect only outlook clients and not the exchange server itself.
TagsNo tags attached.
ThemeAll
BrowserNot defined
PHP VersionAll
MySQL VersionNot defined

Activities

vanilla thunder

2016-08-08 17:36

reporter  

outlook.PNG (45,933 bytes)
outlook.PNG (45,933 bytes)

vanilla thunder

2016-08-08 17:38

reporter  

fcos

2016-11-23 10:43

reporter   ~0011874

Hi,

had the same problem and found another solution and maybe the actual problem.
The problem is also known in the sendmailer issue tracker:
https://github.com/PHPMailer/PHPMailer/issues/606

It seems to be the "setWordWrap" method.
If if have an alt body the wordwrap isnt executed on the html body and the method "hasLineLongerThanMax" returns true and enables the quoted-printable encoding.

I think the combination is having an alt body and an html body with lines that exceeds the maximum of 1000chars is the problem.

I moved the html body wrapping out of the switch, so that the alt and html body get an wrapping and cant reproduce it anymore, but im not sure if thats the ideal fix or more like an workaround.

I could fix it with the changing the method or simply change the text in the cms, that it dosnt exceed 1000chars per line.

anton.fedurtsya

2019-03-26 15:46

manager   ~0012825

Should be fixed with https://github.com/OXID-eSales/oxideshop_ce/pull/697, please double check.