How to have an Outlook web add-in act on incoming emails?

uuid 16 Reputation points
2022-05-07T01:17:14.51+00:00

We are trying to build an Outlook web add-in that acts on incoming emails without requiring a manual trigger from the user. We don't know how to implement this, despite spending countless hours looking through the docs!

Specifically, when an email is received, the add-in should act on that email — e.g. sorting it into a folder, sending an automatic reply on behalf of the user, etc. We don't know how to handle the "when an email is received" part.

We'd hoped event-based activation would work, but it won't because the supported events don't include anything like OnMessageReceived.

We'd also hoped we could approximate "when an email is received" by checking peridiocally for new mail (say, every 2 minutes). But it's crucial that the user doesn't have to manually kick off that process every time they open Outlook because that's way too laborious! (It wouldn't be a problem if they had to manually kick of the process one time — when they first install the add-in — and not after that.)

Is there any way to implement this, even in a more approximate way like checking periodically for new mail? If so, what is the best approach?

Thank you!

Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,703 questions
0 comments No comments
{count} votes