You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Initially, in Structure::parsePart, everything is processed correctly. One part is detected from the email, which is valid – see the output of $parts.
However, at line 118, the condition is skipped, and the valid variable $parts is discarded. The code continues at line 123, where the body is re-parsed using the class Part. The result is an invalid $part.
The final result is that the Message object does not contain $bodies, but it does contain an attachment where $part is invalid.
The solution lies at line 118 – if the valid result ($parts) were not discarded, the issue would be resolved.
The actual bug seems to be here, but you'll need to determine that yourself, as I don't have perfect knowledge of the email structure. Maybe other parts of the email should not be considered as empty so condition will work...
The text was updated successfully, but these errors were encountered:
digiwirtual
changed the title
Empty HTML body, content is considered as attachement
Empty HTML body, content is considered as attachment
May 10, 2025
Looking at your example it has same structure as #580 , a single part inside a multipart structure, PR for issue #455 altered the line you highlight, the original code was:
Reverting back to this (i.e revert commit fad09ad) results in your body being returned correctly.
Unfortunately #455 did not contain any example Mime content so I am not sure what structure he had to require skipping parts if only one is detected inside a mulitpart block, but it seems to be causing some ripples of issues
FYI, I mention I am working on a PR but it was fix for attachments, I didnt realize how extensive issue was and wont help here .
I am not unconvinced perhaps content in issue #455 is exception rather than the rule.
Idea: it can be implemented as feature flag, which will be enabled only for testing purpose or peaple having issue like me. In this case it wount affect any working implementation and after some time, when we will have enought experience with enabled feature, can be removed and fixed permanently.
Uh oh!
There was an error while loading. Please reload this page.
Wrong parsing parts of email, result is empty body and one attachment with wrong parsed html content.
Used config

Problematic email
0-email.zip
The actual bug seems to be here, but you'll need to determine that yourself, as I don't have perfect knowledge of the email structure. Maybe other parts of the email should not be considered as empty so condition will work...
The text was updated successfully, but these errors were encountered: