10. MAPI

Zarafa provides its groupware functionality by connecting the Linux-based server with clients using MAPI.

Messaging Application Programming Interface (MAPI) is a messaging architecture and a Component Object Model based API for Microsoft Windows. Simple MAPI is a subset of 12 functions which enable developers to add basic messaging functionality. Extended MAPI allows complete control over the messaging system on the client computer, creation and management of messages, management of the client mailbox, service providers, and so forth. Simple MAPI ships with Microsoft Windows as a part of Outlook Express/Windows Mail while the full Extended MAPI ships with Office Outlook and Exchange.

For more information about MAPI concepts refer to corresponding MSDN article.

The data model provides an API for working with client-side, and server-side data. A user has access to a set of MAPI stores, which contain MAPI folders, which in turn contain MAPI messages. A simplified view of the MAPI model is shown in “MAPI data model”.

MAPI data model

MAPI data model

MAPI (Messaging Application Programming Interface) Store is actually the base one, which can be extended with plugins. See “MAPI store table”.

An important note here is that Zarafa.core.data.MAPIStore is not a MAPI Store as it is, but an Ext.data.Store used to collect MAPI Messages.

MAPI store table

MAPI store table

One of the main MAPI concepts is a folder. Folders are MAPI objects that serve as the basic unit of organization for messages. Arranged hierarchically, folders can contain messages and other folders. Folders make it easier to locate and work with messages.

MAPI store uses such parameters to build a hierarchy as entryid, parent_entryid and store_entryid entryid is an id of current object in MAPI structure - for example, of the store with calendar appointments. parent_entryid is used to unite this object with hierarchy - so, for a store with calendar appointments, it would be an entryid of a folder with calendar store. store_entryid is a value that represent an entryid of current item’s store. For example, for a store with calendar appointments it would be an entryid of IPFStore - the main store where all stores belong.

A MAPI folder can be seen as a flat list of items, much like a table in a database. Instead of directly issuing, action requests from the client to list or mutate items, a high-level API is provided that exposes a MAPI folder as an Ext JS store (Ext.data.Store).