none
Office Outlook add-in (web) how to know if new mail arrive RRS feed

  • Question

  • I'm trying to develop an add-in in office outlook where add-in should automatically read incoming emails and process my logic to it. I have developed the functionality when I have to specifically click the email to process my logic. But I want the functionality where the add-in should automatically process all incoming emails without manually clicking them.

    Have implemented below points as of now:
    1) outlook pinnable task pane

    2) Item Changed Event

    Office.context.mailbox.addHandlerAsync(Office.EventType.ItemChanged, ItemChanged);

    function ItemChanged(eventArgs){

    /*code*/

    }

    Please suggest.

    Thanks.

    <style type="text/css">p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 18.0px; font: 12.0px Menlo; color: #8cd3fe; -webkit-text-stroke: #8cd3fe; background-color: #171717} span.s1 {font-kerning: none} span.s2 {font-kerning: none; color: #cacaca; -webkit-text-stroke: 0px #cacaca} span.s3 {font-kerning: none; color: #d4d69a; -webkit-text-stroke: 0px #d4d69a} </style>

    Monday, November 25, 2019 1:05 PM

All replies

  • Hello,

    You can use the Outlook Push Notifications REST API .

    The Office 365 push notifications service and API work with clients that provide a web service with a callback address, and use webhooks to deliver notifications to client apps. Webhooks are HTTP callbacks configured by usually a trusted, third-party backend web service. The web service can configure webhooks to cause triggering events on one site to invoke behavior on another.

    When an app subscribes to notifications of a specific resource (such as messages in the user's Inbox), it specifies a webhook callback URL in the subscription request. When a triggering event occurs (such as a new message in the Inbox), the Office 365 notifications service pushes a notification via a webhook to the callback URL. The app, in turn, takes actions according to its business logic, such as getting the new message and updating the unread count.


    profile for Eugene Astafiev at Stack Overflow, Q&A for professional and enthusiast programmers

    Monday, November 25, 2019 2:51 PM