Reputation: 31
I am trying to write a small python program to compare mailboxes with .pst files in order to check for consistency. I want to extract subject, sender, and datetime data from a .pst file using pypff, but I am having trouble extracting the datetime. I am able to open the Inbox and extract the subject and sender, as well as the text body, but not the client submit time or delivery time. When running the code below I get the following error: "OSError: pypff_message_get_delivery_time: unable to retrieve message delivery time. libpff_internal_item_get_entry_va libpff_message_get_delivery_time: unable to retrieve delivery time." And there is a similar one for client_submit_time.
pst = pypff.file()
pst.open("MyInbox.pst")
root = pst.get_root_folder()
for folder in root.sub_folders:
for sub in folder.sub_folders:
count = sub.get_number_of_sub_items()
print(count)
for message in sub.sub_messages:
print(message.get_subject())
print(message.get_plain_text_body())
print(message.get_sender_name())
print(message.get_delivery_time())
print(message.get_client_submit_time())
print("")
pst.close()
I've been looking for documentation for pypff, but haven't been able to find anything. Please let me know if there is good documentation for this library somewhere. Does anyone know why I am getting this error message for the times? Also, if anyone has a better way of comparing mailboxes to .pst files, please let me know.
Upvotes: 1
Views: 1167