MailService - fix email structure with multiple attachments#113
Open
APaikens wants to merge 2 commits intodotkernel:5.2from
Open
MailService - fix email structure with multiple attachments#113APaikens wants to merge 2 commits intodotkernel:5.2from
APaikens wants to merge 2 commits intodotkernel:5.2from
Conversation
Fix multiple file attachment - attachments now are attached as list, not nested recursively. Signed-off-by: APaikens <shamanis@gmail.com>
Signed-off-by: APaikens <shamanis@gmail.com>
Member
Outlook does not send emails using this library, doh |
Member
|
Please check the PHP Stan error |
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.
Outlook has problems sending emails, when there are multiple attachments.
"Expected response code "250" but got code "554", with message "554 5.6.0 Invalid message content when handling MIME exception. IMC53"
Analyzing generated email files found out, that there are problems with structure - old code nests each attachment on top of previous one.
Structure was
Content-Type: multipart/mixed; boundary=Btd1YvhJ ← level 1
Content-Type: multipart/mixed; boundary=rsZ9uNfm ← level 2 (WHY?)
Content-Type: multipart/mixed; boundary=sYDuS8mW ← level 3 (WHY?)
text/html (body)
PDF attachment
other attachment 9012
other attachment 9013
Structure after fix
multipart/mixed; boundary=XXX
text/html (body)
PDF attachment
other attachment 9012
other attachment 9013
After exploration there was conclusion about old solution:
Not strictly invalid per MIME RFC — but result has multipart/mixed inside multipart/mixed
The inner multipart only groups:
HTML body
one PDF
Then another attachment exists outside that group
This structure is redundant and irregular, and Outlook is known to behave unpredictably with nested multipart/mixed blocks like this.