Replies: 2 comments 3 replies
-
Indeed I've not been able to repro this issue myself, but "works for me" isn't a great defence! Overall I always recommend using SMTP to localhost instead of using mail(). It's safer, faster, and provides better debug feedback. With the recent revelation in #3012 that PHP may have changed its policy on line breaks in the mail function, I see even fewer reasons to support it as it makes legacy support increasingly difficult. |
Beta Was this translation helpful? Give feedback.
-
If you're thinking of dropping support for mail() then I'm sure you'll appreciate that there are many existing sites using mail() - however inadvisedly - for whom that would be a shock if it were suddenly dropped without some kind of graceful transition path to SMTP. |
Beta Was this translation helpful? Give feedback.
-
To my understanding, special handling regarding header folding when using
PHPMailer::isMail()
(mail()
) has been introduced in b25f93e and 21b35dc along with the constantMAIL_MAX_LINE_LENGTH
due to #818.I'm curious if this is still an issue (by the
mail()
function) in recent PHP versions? Currently I'm unable to reproduce the issue using PHP 8.2.15. Meaning when I setMAIL_MAX_LINE_LENGTH
to998
the headers are not broken.Is anyone able to reproduce the issue which would still legitimate the existence of
MAIL_MAX_LINE_LENGTH
?Background: I'm trying to implement
List-Unsubscribe
. My tests show that certain mail clients (tested with Thunderbird, FairEmail & eM Client) seem not yet to support foldedList-Unsubscribe
headers. DroppingMAIL_MAX_LINE_LENGTH
or increasing it to998
prevents folding onList-Unsubscribe
in my use cases.Beta Was this translation helpful? Give feedback.
All reactions