bbottema/simple-java-mail

MimeMessageParser doesn't handle multiple attachments with the same name correctly

GnTeezer opened this issue · 1 comments

ParsedMimeMessageComponents uses a TreeSet with a NaturalEntryKeyComparator to store the attachment list.

This means that if we parse an email has multiple attachments with the same name we only get one as each attachment with the same name replaces the previous one.

final Set<Map.Entry<String, DataSource>> attachmentList = new TreeSet<>(NaturalEntryKeyComparator.INSTANCE);

Fix released in 6.0.4.