bbottema / outlook-message-parser

A Java parser for Outlook messages (.msg files)
77 stars 35 forks source link

Embedded images with DOS-like names are classified as attachments #10

Closed fadeyev closed 5 years ago

fadeyev commented 5 years ago

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

bbottema commented 5 years ago

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

bbottema commented 5 years ago

Released v1.3.0