import win32com.client
outlook=win32com.clent.Dispatch("Outlook.Application").GetNamespace("MAPI")
inbox=outlook.GetDefaultFolder(6)
messages=inbox.Items
message.messages.GetLast()
body_content=message.Body
print(body_content)
This will print the body of an email in my inbox. What I want to do is to reveal what is happening at each stage of this code so that I may better understand it, however when I try to print inbox, messages I get:
<COMObject <unknown>>
How do I reveal this so that I can begin to see what I'm working with.
I'm also looking for a place which has clear documentation surrounding using python to interact with MS Outlook, if anyone can share.