MAPI Support

From MozillaZine Knowledge Base

This article was written for Thunderbird but also applies to Mozilla Suite/SeaMonkey Mail.

There are two types of MAPI implementations, SimpleMAPI and ExtendedMAPI.

SimpleMAPI is a subset that is used by applications to call the default email client to send a message without that application having to know anything about what email client is doing the actual work. For example, if Thunderbird was the default email client you could use Microsoft Word, Microsoft Excel, or MYOB to send a message. Many scanners also use SimpleMAPI to mail an image file.

All you need to do to support SimpleMAPI is to configure Thunderbird as the default email client and make certain you don't configure any other email clients that you might run as the default email client. Otherwise the email clients will fight to be the default email client.

The default email client replaces MAPI32.DLL with a stub that redirects any calls to that DLL to itself. This isn't something unique to Thunderbird, that is the way Microsoft designed it. This can have side-effects. Outlooks calendar is implemented as a MAPI provider, so it needs to call the original MAPI32.DLL. This will break if you make Thunderbird the default email client. Novells Groupwise application only supports SimpleMAPI but it insists on being the default email client or it will not work. You can try to workaround this by copying the Groupwise MAPI32.DLL stub to the Groupwise directory. (When a application tries to find a DLL it normally searches in the current directory before it searches the windows system directory.)

Thunderbird's SimpleMAPI support is buggy. It also doesn't fully implement MAPIAddress and MAPIDetails. They always return MAPI_E_FAILURE. MAPIResolveName is implemented in Thunderbird 13.0 [1]. Some third party applications that actually only use SimpleMAPI calls check for whether ExtendedMAPI is supported. This is sloppy programming, and there is nothing you can do to work around it. It's difficult to figure out why a particular application works or doesn't work with Thunderbird because there is no MAPI logging file.

ExtendedMAPI uses MAPI as a actual messaging engine. It is used by Outlook to make native calls to the Microsoft Exchange server. Outlook Express and Thunderbird don't support Extended MAPI. The normal way to use Thunderbird with a Microsoft Exchange Server requires the admin to enable the POP/IMAP/SMTP mail servers that are bundled with that server. If they don't do that see here for some alternatives.

Outlook supports Corporate and Workgroup modes that let you connect to a Microsoft Exchange Server and use any of the information services listed in the Exchange profile. Thunderbird doesn't support that since it can't make native Exchange calls. It supports what Microsoft calls Internet Mail Only (IMO) mode. Thunderbird can access a Microsoft Exchange Global Address List (GAL) by treating it as a LDAP based address book.

Outlook 2013 and later for Windows now uses MAPI over HTTP to connect to Exchange Online mailboxes in Office 365. Microsoft introduced MAPI over HTTP as a replacement for RPC over HTTP in May of 2014. Older Outlook for Windows clients using RPC over HTTP lost the ability to access Exchange Online mailboxes October 31, 2017.[2]

Microsoft appears to be migrating from ExtendedMAPI to Exchange Web Services (EWS) . ExtendedMAPI is now considered a legacy API. They have released versions of Entourage and Outlook email clients that support EWS. Mail.App in Snow Leopard also supports EWS. See Migrating from Exchange 2007 Legacy APIs for more information.

Application calls wrong email client

If you configured Thunderbird as the default email client but an application keeps calling a different email client try renaming mapi32.dll to something else and then run "fixmapi.exe". That should create a new mapi32.dll. [3]


  • Check that Thunderbird is configured as the default email client and that any other email clients you might have are not configured to try to be the default email client.
  • Try using either Outlook Express or Windows Mail as the default email client. If that works then your problem was due to a bug in Thunderbird's SimpleMAPI support.
  • Some users have run into a problem with MAPIResolveName() not working under Windows 7, essentially breaking SimpleMAPI. This effects any email client, not just Thunderbird. If this happens to you the workaround is to install the hotfix from . [4]
  • If you have Outlook, try using it as the default email client. If that works then whatever you did required ExtendedMAPI support, which Thunderbird doesn't support.
  • There have been a couple of bugs (all fixed) where the registry keys for Simple MAPI support are set incorrectly if you upgrade (rather than install using the setup program). If the problem shows up after upgrading, try re-installing Thunderbird. Uninstalling doesn't delete your profile but if you're worried, back it up first with Mozbackup. [5]
  • If you are developing a third party application that uses SimpleMAPI to send mail using Thunderbird see if the Simple MAPI console application works okay.

Operating Systems

  • Windows supports SimpleMAPI. ExtendedMAPI support is added as part of installing Outlook or Exchange.
  • OSX doesn't support MAPI. Entourage uses WebDAV to communicate with Microsoft Exchange servers, not ExtendedMAPI [6]
  • Linux doesn't support MAPI. Wine supports SimpleMAPI but many of the APIs seems to be just stubs. [7]
  • OpenChange is a open source emulation of Microsoft Exchange. That project has a libmapi library used by Evolution, KMail and Mailody (Linux email clients) to access Microsoft Exchange servers natively. There are two old bug reports [8][9] requesting Thunderbird use that library. It was also requested [10] in the planning for Thunderbird 3.0.

OWA Terminology

  • Outlook is a mail client application that is part of the Microsoft Office suite.
  • is a free web based mail account (which used to be Hotmail). It also has POP/IMAP/SMTP support so you can use it with email clients such as Thunderbird.
  • Outlook Web App used to be called Outlook Web Access and is sometimes abbreviated OWA. It is a web client for the Exchange Server or Exchange Online.
  • "Outlook on the web" is the latest name for OWA. However, the Microsoft wiki also states it refers to the Outlook Mail webmail web site. This gets very confusing. [11] [12]
  • Outlook Web App should not be confused with Office Web App, which may be rebranded as Office Online. This second OWA is sometimes referred to as WAC for Web Application Companion.
  • (think Hotmail) and (think Exchange) are both Microsoft cloud based email services, but they are two different products. [13][14][15]

Related bug reports

Other ways to use a Exchange server

DavMail is a POP/IMAP/SMTP/Caldav/CardDAV/LDAP gateway allowing any e-mail/calendar client to access Exchange via OWA. Its written in Java and doesn't seem to require tweaking any scripts like the other solutions do. CardDAV (it synchronizes contact data) can be used in Thunderbird with the SOGo Connector add-on. Using DavMail Gateway To Allow Thunderbird To Access Microsoft Exchange Server 2007 & Earlier has links to Thunderbird specific instructions.

If you want to enable the experimental EWS support, set the hidden davmail.enableEws property to true in [16]

RKent is working on a ExQuilla addon that allows access to both messages and contacts stored on Exchange Server 2007 or 2010. It uses EWS (Exchange Web Services) for access to the server. ExQuilla (beginning with release 24) will work with either Thunderbird 17.* or 24.* on Windows, Linux, and OSX platforms and supports messages and contacts. Support for 17.* will be dropped after support for 31.* is added. Calendar features (which work with the Lightning addon) are being added experimentally, but are not officially supported yet. ExQuilla is not free, it is licensed on an annual basis. New users are granted a free 60 day trial license automatically. Its also available on the Mozilla Add-ons web site as ExQuilla for Microsoft Exchange.

The Exchange EWS provider add-on works with Thunderbird and Lightning.[17] It uses Exchange Web Services but doesn't seem related to the Provider for Microsoft Exchange add-on which also lets you use Microsoft Exchange calendars in Thunderbird, via Exchange Web Services. It supports Microsoft Exchange 2007 and above.

There is a fork of the Exchange EWS provider at Exchange Calendar. It states it is a community driven effort to develop and maintain the "Exchange EWS Provider" extension originally created by Michel Verbraak.

TbSync sync contacts, tasks and calendars to Thunderbird. It currents supports Exchange ActiveSync (EAS) and Sabre/DAV (CalDAV & CardDAV).

Ben Bucksch announced on the tb-planning mailing list (Vol 104, Issue 15 on Oct 11, 2018) that "his company been developing a Thunderbird addon that uses the OWA protocol to connect to Exchange servers. This should allow to read and write email in Thunderbird with your Exchange account that has OWA enabled. The name of the new extension is Owl." "We are currently in the early alpha stages, where we test internally and fix bugs. We should be going into beta soon."

See OWA for some other alternatives.

External links