I'm trying to parse throught sent mails in a shared mailbox. I can parse throught folder inside the mailbox, but impossible to get the mails inside the folders.
The code I use:
compteur= [i for i in range (11)] #Number of mailbox i have to work with
for i in compteur:
if i !=0:
outlook = win32com.client.Dispatch("Outlook.Application")
namespace = outlook.GetNamespace("MAPI")
root_folder = namespace.Folders.Item(i)
for j in root_folder.Folders: # (if i print (j), i can get the folders list of each mailbox )
for k in root_folder.Folders.Items:
print(j) # i get a AttributeError: <unknown>.Items with this code.