Most of you have realized by now that Exchange 2007 doesn’t include MAPI “in the box”. We’re supporting two ways to put MAPI on an Exchange 2007 server:
- The MAPI Download
- Outlook 2007
Some of you have noticed as well that with Exchange 2007, you don’t have to have a Public Folder store. What happens when you try to connect to an Exchange 2007 server that doesn’t have a Public Folder store?
With Outlook 2007, you connect with no problem. Earlier versions of Outlook get this error:
“Your Exchange Server administrator has blocked the version of Outlook that you are using. Contact your administrator for assistance.”
MAPI applications will get the error MAPI_E_FAILONEPROVIDER if they’re using any version of MAPI except the version supplied by Outlook 2007.
So what’s a developer to do? Are you locked in to Outlook 2007’s MAPI? Why did we provide a MAPI download if it won’t even work?
Exchange 2007 blocks all MAPI providers earlier than Outlook 2007 when Public Folders are not available. This is because all of the earlier clients assume Public Folders will be available and will experience failures if allowed to connect. For customers whose code does not depend on Public Folders, a new flag has been made available to allow this check to be bypassed.
Right now, the only version of MAPI which supports this new flag is the MAPI download.
Details on the new flag:
#define CONNECT_IGNORE_NO_PF ((ULONG)0x8000)
This is set in the PR_PROFILE_CONNECT_FLAGS property on the global profile section.
The global profile section can be accessed by calling OpenProfileSection with pbGlobalProfileSectionGuid, which is defined in edkmdb.h.
When this flag is set, Exchange 2007 will not check if public folders are available when logging on. Use of this flag can be demonstrated with MAPI Editor:
- Install the new MAPI download
- In MAPI Editor, do Profile/Show Profiles and open the profile you wish to work on
- Locate the MSEMS service and open it
- Locate the profile section with the PR_PROVIDER_UID of 13DBB0C8AA05101A9BB000AA002FC45A and single click on it
- In the lower pane, locate PR_PROFILE_CONNECT_FLAGS
- Edit this property to OR in the new flag. So for instance, if it previously had 0x2 in there, it would now have 0x8002
- Close all the profile windows and attempt to log on
- Even with this flag you won’t be able to use Public Folders (they don’t exist) so any errors attempting to open or reference them would be expected.
- Both the client side MAPI binaries and the Exchange store need to be aware of the flag for it to work.
- Builds of MAPI that understand this flag are the one from the download only and Exchange 2003 06.05.09.7652 or higher (KB 929751)
- Builds of the Exchange store that understand this flag are Exchange 2007 and Exchange 2003 06.05.09.7652 or higher (KB 929751)
- The build of CDO included in the download will automatically set this flag on dynamic profiles.
- Previous versions of Exchange may not understand this flag, so be sure only to set it when logging on to an Exchange 2007 mailbox.
Update – 4/17/07 Removed inadvertent assertion that there is a build of Exchange 2003 MAPI that understands this flag. If such a build does become available I’ll update again.