Closed duzenko closed 2 months ago
The only difference I can see is line breaks (/n in 6.1.8 vs. /r/n in 6.2.0)
So. umm, why dropped support for legacy Linux senders?
Should have at least mentioned it in the release notes
Fixed by adding
$mailer->isSendmail();
So. umm, why dropped support for legacy Linux senders? Should have at least mentioned it in the release notes
That didn't happen; nothing was dropped, and this change was explicitly mentioned in the release notes, to quote:
Resolve PHP 8 line break issues due to a very old PHP bug being fixed
PHP 8.0 fixed a bug relating to the use of line breaks in the mail
transport, which meant that PHPMailer's workaround code was broken, and it caused double line breaks in PHP 8 versions running on Linux, which was fixed in that version. Anything running PHP older than PHP 8.0 (i.e. legacy code) would be unaffected, as you can see in the code.
You are, in fact, wrong We have been running PHPMailer v5 with PHP 8.2 for one year, and it sent the same HTML in emails, as it had with PHP7 before But the change from v5 to v6 immediately broke the HTML
Problem description
I'm trying to upgrade dependencies for a legacy project It's using PHPMailer v5 and all is good I tried to upgrade to the latest version but some HTML emails are now corrupted I narrowed it down to 6.2.0 which is the first version to exhibit this problem 6.1.8 was the last to send the HTML as is
Here's the diff between the email source as seen by the recipient server![image](https://github.com/PHPMailer/PHPMailer/assets/1481807/8892204c-4924-4e5f-8b60-7debffd9b8d5)
I tried to debug it in the source code and can confirm that the call to the
mail()
function in\PHPMailer\PHPMailer\PHPMailer::mailPassthru
still has the right content. However somewhere along the way some HTML tags are lost. Since 6.1.8 still sends it correctly I can't help but this this has to be header/configuration issue.I don't have any ideas but maybe someone has reported this issue before and you may advise in which direction to look.
Here's my initialization: