-
-
Notifications
You must be signed in to change notification settings - Fork 274
Closed
Labels
Milestone
Description
Current implementation (conditional null check) leads to only the first occurrence of a body part with the respective Content-Type to be parsed. All further occurrences are omitted. Correct behavior should be to either provide a List per Content-Type or concatenate the Strings.
Lines 119 to 122 in a386f0d
if (isMimeType(currentPart, "text/plain") && parsedComponents.plainContent == null && !Part.ATTACHMENT.equalsIgnoreCase(disposition)) { | |
parsedComponents.plainContent = parseContent(currentPart); | |
} else if (isMimeType(currentPart, "text/html") && parsedComponents.htmlContent == null && !Part.ATTACHMENT.equalsIgnoreCase(disposition)) { | |
parsedComponents.htmlContent = parseContent(currentPart); |
Multiple occurrences of body parts with the same Content-Type is valid as per RFC1341, section 7.2.2:
[...] the body parts are independent and intended to be displayed serially [...]
At least the Apple Mail client makes extensive use of this feature when replying or forwarding mails.