Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to receive .msg files as an attachments #10

Open
yakomisar opened this issue Jun 13, 2023 · 10 comments
Open

Unable to receive .msg files as an attachments #10

yakomisar opened this issue Jun 13, 2023 · 10 comments

Comments

@yakomisar
Copy link

Is your feature request related to a problem? Please describe.
During the parsing procedures we are unable to receive attachments that represent .msg files. Instead we have files with "UNKNOWN..." names.

Describe the solution you'd like
Would like to get attachments in their native format. In this particular case -> .msg files. It would be great for further analysis using proprietary applications.

@mooijtech
Copy link
Owner

If you open the file the content should still be of the .msg file, the problem is attachment.GetAttachLongFilename() is empty so a fallback is used (UNKNOWN...).

@yakomisar
Copy link
Author

I understand, but when encountering an attachment with an unknown extension, it is difficult to determine its specific format and, therefore, an application that can open it.

@mooijtech
Copy link
Owner

You could check the magic bytes via https://github.com/gabriel-vasile/mimetype
Possibly GetAttachExtension() returns something but I haven't checked.

@McFlip
Copy link

McFlip commented Aug 20, 2023

I attempted to write out an .msg attachment as a file and only got a small amount of garbage data. I created a test PST file with a single message containing a single attachment - an .msg file. I followed the example code. I believe it's not parsing .msg attachments.

@mooijtech
Copy link
Owner

@McFlip Would it be possible to send me the test PST file (my email is [email protected]) so I can reproduce and possibly fix this issue?

@McFlip
Copy link

McFlip commented Aug 21, 2023

@McFlip Would it be possible to send me the test PST file (my email is [email protected]) so I can reproduce and possibly fix this issue?

On the way!
edit: I had a typo in your address. I sent it again.

@mooijtech
Copy link
Owner

Thanks for the test PST files, makes it much easier to solve.
It seems these are using a different attachment method than the norm as I have never seen this before.
I am attempting to support more attachment methods now (embedded).

@mooijtech
Copy link
Owner

I can now read the embedded attachment, this should be the OLE format.
Possibly it's also compressed because I am getting 11.7KiB instead of 60.5KiB.

Should be solved in a few days.

@mooijtech
Copy link
Owner

ETA may be extended a week since support for writing PST files came up

@McFlip
Copy link

McFlip commented Jan 18, 2024

@mooijtech Hi friend. Any updates? I've been using readpst as a workaround but I would love to use your lib instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants