Messaging Application Programming Interface (MAPI) is an
API
An application programming interface (API) is a connection between computers or between computer programs. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how to build ...
for
Microsoft Windows
Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
which allows programs to become
email
Electronic mail (usually shortened to email; alternatively hyphenated e-mail) is a method of transmitting and receiving Digital media, digital messages using electronics, electronic devices over a computer network. It was conceived in the ...
-aware. While MAPI is designed to be independent of the protocol, it is usually used to communicate with
Microsoft Exchange Server
Microsoft Exchange Server is a mail server and calendaring server developed by Microsoft. It runs exclusively on Windows Server operating systems.
The first version was called Exchange Server 4.0, to position it as the successor to the relat ...
.
Details
MAPI uses functions loosely based on the
X.400 XAPIA standard. It includes facilities to access
message transports, message stores, and
directories.
While ''Simple MAPI'' (SMAPI) is a subset of 12 functions which enable developers to add basic messaging functionality, ''Extended MAPI'' (EMAPI) allows complete control over the messaging system on the client computer. This includes creation and management of messages, plus management of the client mailbox, and service providers.
Simple MAPI is included with
Microsoft Windows
Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
as part of
Outlook Express
Outlook Express, formerly known as Microsoft Internet Mail and News, is a discontinued email and news client included with Internet Explorer versions 3.0 to 6.0. As such, it was bundled with several versions of Microsoft Windows, from Windows ...
/
Windows Mail while the full Extended MAPI is included with
Microsoft Outlook
Microsoft Outlook is a personal information manager software system from Microsoft, available as a part of the Microsoft 365 software suites. Primarily popular as an email client for businesses, Outlook also includes functions such as Calendari ...
and
Exchange
Exchange or exchanged may refer to:
Arts, entertainment and media Film and television
* Exchange (film), or ''Deep Trap'', 2015 South Korean psychological thriller
* Exchanged (film), 2019 Peruvian fantasy comedy
* Exchange (TV program), 2021 Sou ...
.
In addition to the Extended MAPI client interface, programming calls can be made indirectly through the Simple MAPI API client interface, through the ''Common Messaging Calls'' (CMC) API client interface, or by the object-based ''
CDO Library'' interface. These three methods are easier to use and designed for less complex messaging-enabled and -aware applications. (Simple MAPI and CMC were removed from Exchange 2003.)
MAPI was originally designed by
Microsoft
Microsoft Corporation is an American multinational corporation and technology company, technology conglomerate headquartered in Redmond, Washington. Founded in 1975, the company became influential in the History of personal computers#The ear ...
. The company founded its MS Mail team in 1987, but it was not until it acquired
Consumers Software in 1991 to obtain ''Network Courier'' that it had a messaging product. Reworked, it was sold as MS PC Mail (or
Microsoft Mail for PC Networking). The basic API to MS PC Mail was later known as MAPI version 0 (or ''MAPI0''), to differentiate it from "true" MAPI.
Service provider interface
The full Extended MAPI interface is required for interfacing messaging-based services to client applications such as Outlook. For example, several non-Microsoft e-mail server product vendors created "MAPI service providers" to allow their products to be accessed via Outlook. Notable examples include
Axigen Mail Server,
Kerio Connect,
Scalix,
Zimbra,
HP OpenMail,
IBM Lotus Notes
HCL Notes (formerly Lotus Notes then IBM Notes) is a proprietary collaborative software platform for Unix ( AIX), IBM i, Windows, Linux, and macOS, sold by HCLTech. The client application is called Notes while the server component is branded ...
,
Zarafa/
Kopano, and
Bynari.
MAPI also had a service provider interface of sorts. Microsoft used this to interface MS Mail to an email system based on
Xenix
Xenix is a discontinued Unix operating system for various microcomputer platforms, licensed by Microsoft from AT&T Corporation. The first version was released in 1980, and Xenix was the most common Unix variant during the mid- to late-1980s. T ...
, for internal use.
Extended MAPI is the main e-mail data access method used by Outlook, to interface to Microsoft Exchange, via MAPI service providers shipped with Outlook.
MAPI/RPC protocol details
Microsoft has released full details of the MAPI/RPC protocol since August 2007.
"MAPI protocol" is a colloquial name for the MAPI/RPC. At times, Microsoft has also called it "Exchange RPC" and "Outlook-Exchange Transport Protocol".
Microsoft provides a sample MAPI/RPC-based application called MFCMAPI to assist developers. It is also widely used as a diagnostics tool by both developers and Microsoft Exchange administrators.
MAPI over HTTP
The original implementation was designed for use on a local network, or
LAN.
With Exchange 2003 and Outlook 2010, Microsoft introduced RPC over HTTP (later renamed Outlook Anywhere) as a way to Exchange over the internet.
In 2014, Exchange 2013 SP1 introduced another variant, this time with a more "normal" HTTP-based stack known as "MAPI over HTTP".
Incompatibility with Internet Mail
The
Simple Mail Transfer Protocol
The Simple Mail Transfer Protocol (SMTP) is an Internet standard communication protocol for electronic mail transmission. Mail servers and other message transfer agents use SMTP to send and receive mail messages. User-level email clients typ ...
has always supported the concept of mail with multiple authors, and distinguishes between the "sender" and "authors" whenever there is more than one of the latter. MAPI cannot represent separate authors and senders except through the delegation mechanism, which does not permit more than one author. Thus MAPI cannot accurately transmit group letters from scientific communities to legislators, or presentation of group research via email, or similar scenarios. When fully SMTP compliant mailers (e.g.
Thunderbird) send perfectly formed SMTP messages with multiple authors into MAPI-dependent email infrastructures (such as Exchange/Outlook, O365, or Outlook.com) the messages must have their information density reduced to fit MAPI, presenting challenges for authentication and anti-spoofing technologies that rely on accurate message metadata transmission, and fundamentally changing messages to be something other than what was originally sent. Although the security implications impact all users, inability to represent multiple authorship is generally of little concern in purely hierarchical settings such as traditional businesses and military organizations, primarily impacting legislative and academic institutions.
Reimplementations
Several
open-source software project
Open-source software development (OSSD) is the process by which open-source software, or similar software whose Source Code Management, source code is publicly available, is developed by an open-source software project. These are software products ...
s have started working on implementing MAPI libraries, including:
* Grommunio/Gromox has C++20 implementations of MAPI/RPC and MAPI/HTTP servers.
* The OpenMapi project (now demised) had a C# implementation.
*
Kopano Groupware Core has a C++2011 implementation called "mapi4linux" (continuation of the same from
Zarafa), which offers an API that is source-backwards-compatible with the Messaging API (code written for M4L also build with the Windows SDK). Kopano GWC comes with a connector for the Zarafa/Kopano-based SOAP/HTTP transport.
*
OpenChange has a "libmapi" component written in C that only partially resembles MAPI. (Lacks interfaces like IMsgStore, the OpenEntry function.)
* The OpenChange subproject
Evolution-MAPI is a connector for Exchange implementing the MAPI/RPC transport.
* The GNOME
Evolution project develops ''evolution-ews'', which has implemented much of MAPI.
References
External links
Messaging API at MSDN LibraryOpenChange project - details of MAPI protocol and tools for exploring MAPI protocolOpenMapi project - Open Source, multi-language MAPI implementation which can connect to other groupware sources, with API documentationMessaging API Archived User ForumEnabling Outlook Connector logging for support
{{Microsoft APIs
Internet mail protocols
Microsoft application programming interfaces