fix-email-send-multipart-1956-new3 #1977
Open
+166
−1
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.
Summary
Fixes #1956
This PR fixes the behavior of the
@email-sendendpoint when handling multipart or preformatted email messages.Problem
Plone always prepended
message_introtext to outgoing emails, including multipart messages.For multipart emails (HTML + text, attachments, etc.), this breaks the message structure and results in invalid emails.
What this PR changes
message_from_stringWhy this is needed
Multipart email messages must preserve their original structure.
Injecting additional text into multipart payloads corrupts the MIME format and can break email rendering or attachments.
News item
Added a bugfix news entry:
Closes #1956
📚 Documentation preview 📚: https://plonerestapi--1977.org.readthedocs.build/