bbottema/outlook-message-parser

Embedded images with DOS-like names are classified as attachments

fadeyev opened this issue · 2 comments

During parsing of one particular email one of the embedded images was qualified as an attachment, not as an embedded image (though actually it was an embedded image).

Not sure how this email was created, however debug showed that OutlookFileAttachment longFilename property was something like my-embedded-image.png when short file name was my-emb~1.png, while in the html body the image was referenced by its full name: src="cid:my-embedded-image.png". Probably we can change OutlookMessage#htmlContainsCID() method to check both filename and longFilename

Probably the same issue was reported earlier in #1

This was a pretty easy fix, but difficult to test, since I don't have an example .msg file with this case.

Released v1.3.0