Repository navigation
Implement wordwrap for unencoded (7bit/8bit) bodies - #38
Merged
Merged
Conversation
We have been running a patch to wrap this line to 750 characters for the last .... forever. 998 is the RFC 5322 max line length (section 2.1.1) - although 78 is recommended & might be better. Per review feedback: quoted-printable and base64 already enforce their own 76-character line wrapping as part of encoding (see getEncodedData()), so wrapping the raw body in setBody() before encoding had no effect for those two and only mattered for 7bit/8bit, which pass through unencoded. Moved the wrap into Mail_mimePart::getEncodedData()'s 7bit/8bit branch instead, where it actually affects the transmitted line length. Added a test covering the 7bit wrap, that short bodies are untouched, and that quoted-printable's own wrapping is unaffected. https://datatracker.ietf.org/doc/html/rfc5322#section-2.1.1 https://storage.googleapis.com/civicrm/patches/38231167f0c789e0b368b38c1499973d562de65e87094b402156a6b928cc4c38/crm_3133.patch
Closed
eileenmcnaughton
added a commit
to eileenmcnaughton/civicrm-core
that referenced
this pull request
Oct 29, 2026
CRM-3133 wordwrap body to be 750 characters to apply with RFC 2821 patch is now in core - created upstream pr for it but handling in our repo pear/Mail_Mime#38
Contributor
Author
|
thanks for the quick merge @alecpl - any chance of getting it tagged? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Alternate to #30 based on feedback
https://datatracker.ietf.org/doc/html/rfc5322#section-2.1.1