Closed Deeborg closed 3 years ago
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.
@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 https://github.com/libyal/libpff/issues/2
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.
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
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.
Is there any other way to extract recipient, cc and bcc details?
you could get the raw MAPI values
Please download sample pst from below link
thx I'll have a look as soon as time permits
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.
Try record_entry.get_data()
https://github.com/libyal/libpff/blob/main/pypff/pypff_record_entry.c#L54
record_entry works on what object? Or rather how do I create record_entry object?
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().
Got everything to work as required. Thanks for this amazing library and the support!!
Hi Deeborg, Could you please guide how you extracted From, to, subject data from the get_data method.
@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...
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.