Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CFMail splitting long HTML lines into multiple lines breaking the HTML #1722

Open
wants to merge 1 commit into
base: 5.3
Choose a base branch
from

Conversation

dswitzer
Copy link
Contributor

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

#1706

* Updated HTML email parts to use quoted-printable content transfer encoding
* Updated StringDataSource to allow non-wrapping of text source
* Added unit test coverage for changes (you need to rename _Mail.cfc to Mail.cfc for the tests to run)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant