The best thing about MAPI is the extensive feature set it enables for clients such as Outlook and, in its server-side variants, Exchange server. I guess you could argue that MAPI has been very persistent in that the name first appeared as “simple MAPI” in Microsoft Mail way back in the dim and distant early nineties. Of course, the functionality that you can build on the twelve functions supported by simple MAPI is barely sufficient to create and send messages and can’t come near the kind of feature set that’s found in Outlook 2010, but it was a start.
Powerful as it is, MAPI has never attracted much developer enthusiasm and has been viewed as an API that should only be approached when absolutely necessary. The lack of good documentation is possibly one reason (the book “Inside MAPI” has been out of print for many years) and the upshot is that only heavy-duty engineering projects such as those to create MAPI providers that allow Outlook to access non-Microsoft servers have used MAPI.
Over the last twenty years Microsoft has shipped many other messaging-related APIs, including esoteric offerings such as Collaborative Data Objects (CDO) Routing (released with Exchange 5.5) and WebDAV (which was going to be the “next great thing” when Exchange 2000 came along). However, MAPI remains the king of the hill, which is why tools such as MFCMAPI remain so important. If pressed, I imagine that Microsoft would acknowledge that their track record in releasing other APIs to work with Exchange has not been stellar.
Things might well be changing with Exchange Web Services (EWS), which is now the recommended API for developers who want to access and work with the contents of the Exchange Store. Microsoft uses EWS for clients such as Outlook 2011 for Macintosh and Outlook Web App (OWA) and plans are in place to extend EWS further as new versions of Exchange appear, probably to close the functionality gap between EWS clients and the MAPI-based Outlook 2010. As far as I am aware, there’s no plan to discard MAPI for EWS in the short to medium future, but I guess this is a possibility once EWS supports the same feature set as MAPI does today.
In the interim, it certainly seems that EWS is a good thing to know something about. When I wrote about MFCMAPI, I was prompted by Jens Trier Rasmussen, who’s been around Exchange for almost as long as I have, that I should have mentioned the existence of EWSEditor, another Codeplex project that’s built on top of .NET Framework 3.5. The latest version of EWSEditor (188.8.131.5240) was released in December 2011 and works with on-premises Exchange 2007 or Exchange 2010 servers. I wasn’t successful in getting it to work with , but I’m sure I was doing something silly.
When I received questions about EWS in the past, my standard practice was to point the requestor to MVP Glen Scales’s web site to interrogate the rich repository of code examples that he maintains. I’m delighted to have another EWS suggestion to offer to people now. Spreading knowledge creates that kind of glow… And by the way, Happy Valentine's Day!
Follow Tony Redmond on Twitter @12Knocksinna