Open
Description
Wrong parsing parts of email, result is empty body and one attachment with wrong parsed html content.
Problematic email
0-email.zip
- 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...