import win32com.client
import os
Outlook = win32com.client.Dispatch("Outlook.Application")
olNs = Outlook.GetNamespace("MAPI")
Inbox = olNs.GetDefaultFolder(6)
Filter = "[Subject] = 'John Doe Test Results'"
Items = Inbox.Items.Restrict(Filter)
Item = Items.GetFirst()
messages = Inbox.Items
print(type(messages))
for attachment in Item.Attachments:
print(attachment.FileName)
attachment.SaveAsFile(os.path.join(r"C:\Users\Conrad\Desktop\test\New folder" + attachment.FileName))
this downloads the attachment on the email and puts it in a folder on my desktop. I want to be able to print the body of the email so further on I can add it to a dataframe and send it to excel, but I just need help pulling and printing the body message.