Skip to content
Advertisement

Python run script upon mail reception [closed]

I have a .py script which I would like to run automatically upon reception of mail from sender with a certain subject. What would be the best way to achieve this?

Advertisement

Answer

You can use the module exchangelib to access your email, but you can’t just have it listen. You would need to scrape it on an interval. You can also se VBA macros discussed here: https://learn.microsoft.com/en-us/office/vba/outlook/concepts/getting-started/writing-an-outlook-macro An example:

JavaScript

https://www.slipstick.com/outlook/filter-messages-offensive-words/

https://pypi.org/project/exchangelib/

JavaScript
Advertisement