Communication with Microsoft Exchange Server

Server applications communicate with Microsoft Exchange Server components through MAPI. This communication includes actions such as:

Special functions included with this SDK were developed specifically for communication between server applications and Microsoft Exchange Server. Some of these functions extend MAPI functionality, some enhance debugging capabilities, and others add completely new functionality.

To provide their service, most server applications must communicate with directory objects and information store objects. Depending on their functionality, many server applications must communicate with the Administrator program and Administrator extensions as well. The following illustration shows the primary ways a server application communicates with Microsoft Exchange Server components, including information stores, mailboxes, the directory, and the Administrator Program.

Server application and Microsoft Exchange Server communications

A server application is not required to run on the same computer as the Microsoft Exchange Server software. Most server applications use MAPI, which is an RPC interface and can therefore be used over a network connection. This means the server application is not required to share a processor with the server, which can improve performance as long as the number of RPCs is kept small. Efficient use of MAPI, along with sparing use of RPCs, improves the performance of distributed processing architectures. For more information about performance considerations for server applications using RPCs, see Reducing the Number of RPCs.

Receiving Mail Messages

Once a mailbox agent or gateway has been installed, a corresponding Mailbox-Agent or Mail-Gateway object exists in the directory, which provides an address and the ability to receive messages. Even if a server application is not specifically designed to receive or handle messages, it’s a good idea to let users or administrators check for received messages. The ability of an application to receive mail can also be helpful when troubleshooting. For example, you can design a gateway application that forwards all messages that meet certain requirements and holds back those messages with inadequate or unrecognized addresses. These held-back messages can reside in the gateway’s own mailbox until an administrator or developer examines them and diagnoses the problem. A MAPI profile provides the ability to log on to a mailbox. For more information, see Creating a MAPI Profile for a Server Application.