Below is the program which shows how to read the Office 365 Outlook Inbox emails received from specific email-id in python. I have read all the email id from which I have got emails in the inbox folder. Also, I have all the emails text body from received from specific email-id in python. For this you need to install the pywin32 library in your program using following command. pip install pywin32 The program is: from win32com.client import Dispatch import win32com outlook = Dispatch( "Outlook.Application" ).GetNamespace( "MAPI" ) inbox = outlook.GetDefaultFolder( "6" ) all_inbox = inbox.Items folders = inbox.Folders for msg in all_inbox: if msg.Class == 43 : if msg.SenderEmailType == 'EX' : print (msg.Sender.GetExchangeUser().PrimarySmtpAddress) else : print (msg.SenderEmailAddress) outlook = win32com.client.Dispatch( "Outlook.Application" ).GetNamespace( "MAPI" ) inbox = outlook.GetDe...
Blog which contains C#, asp.net, asp.net MVC, Selenium webdriver with core java, Bootstrap, Jquery and many more