- Issue created by @kenorb
- Status changed to Postponed: needs info
over 1 year ago 6:04pm 12 May 2023 - πΊπΈUnited States tr Cascadia
Is there a reason you can't use the Mime Mail module instead? See π± The future of the HTML Mail module Needs review
The issue of email line separators has been a problem forever - ever since PHP added mail() functionality. PHP does the wrong thing, then Drupal core does the wrong thing trying to compensate for PHP, so mail module like HTML Mail had to do the wrong thing to work with the Drupal core hack that *required*
\n\n
even though the RFC says\r\n
.This has been possibly fixed in PHP 8.0, but we still need to fix Drupal core. That issue is π PhpMail : broken mail headers in PHP 8.0+ because of LF characters Fixed . Bottom line, this is not a new issue, everyone who maintains a mail-related module is aware of this, and it is also something that has no definitive fix because in some cases mail transfer agents (which are independent of PHP and Drupal) also do the wrong thing with respect to line termination characters. I have always argued that Drupal should stick with the RFC and if that causes problems with the MTA then the MTA should be fixed or a different MTA should be used - it shouldn't be the case that Drupal has to add hacks to avoid issues with MTAs.
I have put a lot of effort into Mime Mail over the past few years to make it comply with the RFC. HTML Mail on the other hand in my opinion is a lost cause because it relies on an old, outdated, and not supported PEAR package. There is no active maintainer for HTML Mail, unlike Mime Mail, and it would take quite a bit of effort to bring HTML Mail up to standards - effort which I see as wasted because at this point in time there is no need to have multiple contributed modules to do the same thing.
I am inclined to mark this issue as "won't fix" in light of what I wrote in π± The future of the HTML Mail module Needs review . Please discuss any concerns you have about the transition from HTML Mail to Mime Mail in that issue.