Lucee icon indicating copy to clipboard operation
Lucee copied to clipboard

CFMail splitting long HTML lines into multiple lines breaking the HTML

Open dswitzer opened this issue 3 years ago • 0 comments

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 wrappingquoted-printable always 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 charactersquoted-printable will 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

dswitzer avatar Jul 26 '22 15:07 dswitzer