Quantcast
Channel: Active questions tagged email - Stack Overflow
Viewing all articles
Browse latest Browse all 29767

Read contents of a selected Outlook e-mail using python

$
0
0

I have this simple piece of code that reads the content of the last e-mail in my inbox.

How can I do the same for e-mail I click on/highlight within Outlook?

import win32com.clientoutlook = win32com.client.Dispatch("Outlook.Application").GetNamespace("MAPI")inbox = outlook.GetDefaultFolder(6) messages = inbox.Itemsmessage = messages.GetLast()print(message.body) 

Viewing all articles
Browse latest Browse all 29767

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>