I have 2 mailboxes ([email protected] and [email protected]) in outlook and need to connect to a specific mailbox. By default, Python's win32com.client is connecting to the wrong one.
Is there a parameter to specify which mailbox to connect to? My code is:
outlook = win32com.client.Dispatch("Outlook.Application").GetNamespace("MAPI")
inbox = outlook.GetDefaultFolder(6)
messages = inbox.Items
I have tried very hard to find which parameters allow me to connect to a specific mailbox but did not see anything. Thanks for your help.
for folder in outlook.Folders: print(folder.Name)gives you?