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

transport header missing for multiple messages? #101

Closed
Deeborg opened this issue Jun 9, 2021 · 15 comments
Closed

transport header missing for multiple messages? #101

Deeborg opened this issue Jun 9, 2021 · 15 comments
Assignees
Labels

Comments

@Deeborg
Copy link

Deeborg commented Jun 9, 2021

Hi Team,
transport_header returns none for most of the messages in pst file. I checked those messages manually and compared those to where transport headers are being read and I do not see any difference between them. Could you please help?
I have attached screenshot of one of the mails which was giving None when extracting transport headers for your reference.

image

@Deeborg Deeborg changed the title get_transport_header() returns None for most of the mails get_transport_header() returns None for many messages Jun 9, 2021
@Deeborg
Copy link
Author

Deeborg commented Jun 10, 2021

All I am looking for from header is sender address, recipient address, cc, bcc. Is there any alternative to get them? I could find only sender_name function in message class. Had no luck with others.

@joachimmetz
Copy link
Member

joachimmetz commented Jun 10, 2021

@Deeborg pff is a MAPI value database, it really depends from version to version, file to file, what MAPI values are stored and which not. You'll have to do the research which values are stored in your file and which not e.g. pffexport has multiple modes here that can help you.

Also since you mention None, pypff has not yet been completed also see #2

@joachimmetz joachimmetz self-assigned this Jun 10, 2021
@joachimmetz joachimmetz changed the title get_transport_header() returns None for many messages transport header missing for multiple messages? Jun 10, 2021
@Deeborg
Copy link
Author

Deeborg commented Jun 11, 2021

Looks like the problem is with encoding. Those messages encoded with UTF-8 are being read. Others with western European are returning None. I have also noticed few messages where headers are not displayed when I go to message properties and encoding information is not available for these messages.

@joachimmetz
Copy link
Member

Can you provide a sample file or debug output https://github.com/libyal/libpff/wiki/Troubleshooting#verbose-and-debug-output. PFF and MAPI after all are proprietary, partially documented, formats

@Deeborg
Copy link
Author

Deeborg commented Jun 11, 2021

Please download sample pst from below link
https://drive.google.com/file/d/1otTielU_uHntcVENUMtk5BTkFWTyIhsK/view?usp=sharing

Is there any other way to extract recipient, cc and bcc details?
message class has only sender_name.

@joachimmetz
Copy link
Member

joachimmetz commented Jun 11, 2021

Is there any other way to extract recipient, cc and bcc details?

you could get the raw MAPI values

@joachimmetz
Copy link
Member

Please download sample pst from below link

thx I'll have a look as soon as time permits

@Deeborg
Copy link
Author

Deeborg commented Jun 11, 2021

Is there any other way to extract recipient, cc and bcc details?

you could get the raw MAPI values

Thanks! That would totally solve my problem. I would appreciate if you could help me get MAPI values with pypff. I went through the source and am unable to find it.

@joachimmetz
Copy link
Member

@Deeborg
Copy link
Author

Deeborg commented Jun 11, 2021

record_entry works on what object? Or rather how do I create record_entry object?

@Deeborg
Copy link
Author

Deeborg commented Jun 11, 2021

Got it. I was trying get_entry directly on message object.
message.get_record_set(0).get_entry(0).get_data() --> This works
Please let me know if i'm wrong here.
Now, i'm thinking I should look at https://github.com/libyal/libfmapi/blob/main/documentation/MAPI%20definitions.pdf for the argument to enter in get_entry().

@Deeborg
Copy link
Author

Deeborg commented Jun 14, 2021

Got everything to work as required. Thanks for this amazing library and the support!!

@Deeborg Deeborg closed this as completed Jun 14, 2021
@MaheshE99ME25
Copy link

Hi Deeborg, Could you please guide how you extracted From, to, subject data from the get_data method.

@luckman212
Copy link

@Deeborg Would you be so kind as to post your working code? I am struggling to extract some email addresses (sender/recipient) from a PST...

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

No branches or pull requests

4 participants