About: Mailbox event and Notification APIs


One with developing code for messaging development is to have code run when a specific event happens.  Each mailbox API has its own ways of handling calls.  Below is an overview of APIs which support events on the mailbox.

Exchange Web Services (EWS):

Exchange Web Service notifications are widely used and has several models for notifications.  Be sure to read-up on each notification methodology to find which is best for your application.  Your code should be written to handle Exchange related throttling and the possible errors which might be thrown. When going against Exchange 2010, 2013 and Exchange Online its extremely important to write your code to support affinity.

Notification subscriptions, mailbox events, and EWS in Exchange
https://msdn.microsoft.com/en-us/library/office/dn458791(v=exchg.150).aspx

How to: Maintain affinity between a group of subscriptions and the Mailbox server in Exchange
https://msdn.microsoft.com/EN-US/library/office/dn458789(v=exchg.150).aspx

Handling notification-related errors in EWS in Exchange
https://msdn.microsoft.com/EN-US/library/office/dn458788(v=exchg.150).aspx

Mailbox synchronization and EWS in Exchange
https://msdn.microsoft.com/en-us/library/office/dn440952(v=exchg.150).aspx

EWS throttling in Exchange
https://msdn.microsoft.com/en-us/library/office/jj945066(v=exchg.150).aspx

REST for Exchange Online:

REST calls go directly against Exchange and the calls can be done from any client.

Outlook Notifications REST API reference (preview)
https://msdn.microsoft.com/office/office365/APi/notify-rest-operations

About: 365 REST APIs
http://blogs.msdn.com/b/webdav_101/archive/2015/05/18/about-365-rest-apis.aspx

Outlook Object Mode (OOM):

Outlook Object Model can be used in several ways.  First, there is Outlook in-application VBA support which will handle events.  Outlook is extensible through custom add-ins and such add-ins run code off of events.  An external application can also be written to handle mailbox events.   Note that OOM code needs to be run with an interactive user present. So, its not suitable for things such as windows and web services or web pages or any other form of non-user monitored automation.

Working with Outlook Events
https://msdn.microsoft.com/en-us/library/office/ff865014.aspx

Using Events with Automation
https://msdn.microsoft.com/EN-US/library/office/ff866235.aspx

OOM can also handle Outlook application events:

Application events
https://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.application_events.aspx

Outlook Object Model Overview
https://msdn.microsoft.com/en-us/library/ms268893.aspx

With .NET code some extra care needs to be taken with Outlook Object model:

OOM.NET blog POSTS
http://blogs.msdn.com/b/mstehle/archive/tags/oom-net/

Mail apps for Outlook

With Exchange Online there is a new type of development for customizing OWA called Mail apps for Outlook and it can run code upon some events.

Mail apps for Outlook
https://msdn.microsoft.com/en-us/library/office/fp161135.aspx

Extended MAPI Notifications:

Even though Extended MAPI is an extremely old messaging API it is still widely used today and it also does support code firing off of events.  Note though that Extended MAPI must be written with unmanaged code such as C++.

Event Notification in MAPI
https://msdn.microsoft.com/en-us/library/office/cc842079.aspx

MAPI Notification Events
https://msdn.microsoft.com/en-us/library/office/cc840027.aspx

If you decide to go down the path of Extended MAPI then be sure to leverage this blog for information:

SGriffin’s MAPI Internals
http://blogs.msdn.com/b/stephen_griffin/

Exchange Store Sinks

About: Exchange Store Sinks
http://blogs.msdn.com/b/webdav_101/archive/2015/05/18/about-exchange-store-sinks.aspx

Also see:

About: Messaging APIs
http://blogs.msdn.com/b/webdav_101/archive/2015/08/07/about-messaging-apis.aspx 

 

 

Comments (0)

Skip to main content