简体   繁体   中英

Display certain email in Outlook using Python

I have built a script that analyze my outlook inbox mails using Python + Exchangelib. It screens my email inbox eg from the last 2 days with some conditional statements and the output would be all emails that need my attention and its attributes (including Conversation-ID and Email-ID).

So far so good.

Now I'd like to open/display one of the emails from my script on my local email client (Outlook).

  1. I found out that there is no possibility to use Exchangelib to display it on Outlook, but is that really the case? What would be the method for that?

  2. If so, what are my other options? The solution should make use the email-attributes from my screening script (eg Conversation-ID or Email-ID) as a pointer to the emails to be opened on Outlook.

  3. How about O365 (which method?) or pywin32(MailItem.display())? The pros and cons? As I understand it, pywin32 is not applicable on Unix system.

Thanks for any inputs:-)

There doesn't seem to be a way to deeplink to a specific email in OWA. See some discussion at https://github.com/OfficeDev/office-js/issues/1095

Outlook provides some command-line switches to open Outlook in various modes, but there doesn't seem to be a switch to open Outlook with a specific email ID. See a full overview of switches at https://www.howto-outlook.com/howto/commandlineswitches.htm#overview

Regarding exchangelib and Outlook: exchangelib is a cross-platform tool and Outlook is only available on Windows and OS X, so exchangelib doesn't offer any integration with Outlook.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM