Searching the Internet for accessing Outlook PST-Files with Python gives very little results (and most of the stuff shown is outdated). Does anyone know how to read a PST with or without a library? Unfortunately I am not good enough in programming to build a PST-reader without the help of a library.
My target is to get the following information about the content:
- Number of Items per Folder
- Type of Item (Mail, Meeting, Contact...)
- Size of Items
- Attachments including size
- maybe other Meta-Data like date, recipients etc. (optional)
I already tried the following things:
libpff / pypff : crashes and seems to read whole file in memory before doing something (no good solution as the PST-files are kept on a slow network storage).
Libratom : same problem as it is based on libpff.
Libpst : unclear how this is used / comes as a binary (no explanation how to install) / see answer on this post / does not seems to be maintained or updated.
win32 (mounting PST in Outlook) : one tutorial showed how to mount the PST into a locally installed Outlook and getting the contents with MAPI-access, but this is also very, very slow and not a good solution as Outlook is needed.
Asponse Email Python : promising at the start though documentation is not very good (no Python examples / different naming e.g. for the PersonalStorage object and many others / stops after 50 items per folder (maybe a limit of the non-free version, but unclear due to lack of explanation on the publishers website).
This is an example from the Asponse-website:
personalStorage = PersonalStorage.from_file(dataDir + "Outlook.pst")
folderInfoCollection = personalStorage.root_folder.get_sub_folders()
for folderInfo in folderInfoCollection:
print("Folder: " + folderInfo.display_name)
print("Total Items: " + str(folderInfo.content_count))
print("Total Unread Items: " + str(folderInfo.content_unread_count))
print("----------------------")
I did heavy googling to find the fitting import-statement to make this run.
Does anyone have a stable clear approach for reading Outlook PST files? Even a solution using Asponse would be great exceeding the 50 items limit.