-
-
Notifications
You must be signed in to change notification settings - Fork 176
Open
Description
Describe the bug
An attachment is seen as inline if the filename is included in the body of the message, even when it's just added as normal text.
This seems to be caused by this check in the Message.cs file:
if (body.Contains($"{attach.FileName}")) continue;
Logger.WriteToLog("Marking the attachment as NOT inline because we can't find it in the HTML body");
When I remove this line of code it is detected correctly, both with and without inline images.
To Reproduce
Steps to reproduce the behavior:
- Create an MSG file with an attachment (for example the file 'test.jpg')
- Make sure the attachment contains a ContentId
- Add the name of the file somewhere in the body as normal text (so 'test.jpg')
- Execute new Reader().ExtractToFolder
- See that the test.jpg file is seen as inline
Expected behavior
Don't mark an attachment as inline if the filename appears in the body without a cid prefix.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
No labels