MAPI Support

From MozillaZine Knowledge Base
Jump to navigationJump to search

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


There are two types of MAPI implementations, SimpleMAPI and ExtendedMAPI. ExtendedMAPI uses MAPI as a actual messaging engine. It used by Outlook to make native calls to the Microsoft Exchange server. Outlook Express and Thunderbird don't support Extended MAPI, which is why you can only use them with a Microsoft Exchange Server if the admin also installs POP/IMAP/SMTP mail servers on that server.

SimpleMAPI is a subset thats 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, thats 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, MAPIDetails and (more importantly) MAPIResolveName [1] . They always return MAPI_E_FAILURE. 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. Its difficult to figure out why a particular application works or doesn't work with Thunderbird because there is no MAPI logging file.

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.

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.

Troubleshooting

  • 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. You might want to register with Bugzilla (Mozilla's bug reporting system) and vote to fix the bug
  • To set your personal account as the default in Thunderbird, open Thunderbird > select Tools > Account Settings > Account Actions (on the left pane) > click "Set as Default" (which will then grey out) > click OK. (This solve most of problems on Xp, Vista and Seven). You have to do this even if you have only one account.
  • 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 Moazbackup. [2]

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 [3]
  • Linux doesn't support MAPI. Wine supports SimpleMAPI but many of the APIs seems to be just stubs. [4] A few applications such as Evolution have a plugin to allow it communicate with Microsoft Exchange servers, but that doesn't let other applications make SimpleMAPI calls to it.

Related bug reports

See also

External links