Lucee
Lucee copied to clipboard
CFMail splitting long HTML lines into multiple lines breaking the HTML
I've refactored CFMAIL to use quoted-printable content transfer encoding for all HTML parts. On the suggestion of @zspitzer, I added a system property/environment variable (i.e. lucee.mail.use.7bit.transfer.encoding.for.html.parts) which allows switching back to the old behavior. This defaults to false which changes the behavior, but the only downside I can see to switching to quoted-printable as the default encoding is the message size will be a little larger. However, it fixes issues like:
-
Line wrapping —
quoted-printablealways wraps lines to 76 characters. - Does not break long strings — Long strings are encoded in the line wrapping, which means you could have a string (like a link) longer than 1000 characters without CFMAIL breaking the string after 997 characters.
-
Encodes non-ASCII characters —
quoted-printablewill encode characters you cannot normally send with 7bit encoding, such as 8bit UTF characters.
https://luceeserver.atlassian.net/browse/LDEV-4039
https://github.com/lucee/Lucee/pull/1706