Search code examples
c++exchange-servermapi

server name of MAPI account


how can I find out the server name of a MAPI account for Microsoft Exchange Server? Thank you!


Solution

    1. Under Outlook 2010, read the PR_EMSMDB_SECTION_UID property. If the property is missing or if using an older version of Outlook, assume pbGlobalProfileSectionGuid.
    2. Use the GUID from (1) to call IMAPISession.OpenProfileSection().
    3. Read PR_PROFILE_HOME_SERVER property from the IProfSect object returned from (2)

    You can play with this in OutlookSpy (I am its author) - click IMsgStore and IMAPISession.