I have a shared inbox in outlook and I want to write some code that would get me the emails from the shared inbox. Right now I can get the emails from my main inbox, but I want to do it for another inbox.
This is the code so far:
import os
import win32com.client
outlook = win32com.client.Dispatch('Outlook.Application').GetNamespace('MAPI')
inbox = outlook.GetDefaultFolder(6).Folders('Some Magic Folder')
messages = inbox.Items
My guess is that I shouldn't be looking at the GetDefaultFolder method but something else, but I'm not quite sure where to look at.