Platform SDK: CDO 1.2.1

Introduction to MAPI

MAPI defines a complete architecture for messaging applications. The architecture specifies several well-defined components. This allows system administrators to mix and match components to support a broad range of vendors, computing devices, and communication protocols.

The MAPI architecture can be used for e-mail, scheduling, personal information managers, bulletin boards, and online services that run on mainframes, personal computers, and hand-held computing devices. The comprehensive architectural design allows MAPI to serve as the basis for a common information exchange.

The MAPI architecture defines messaging applications, or clients, that interact with various message services through the MAPI programming interfaces, as shown in the following diagram.

To use the messaging services, a client must first establish a session. A session is a specific connection between the client and the MAPI interface based on information provided in a profile. The profile contains configuration and user preference information. For example, the profile contains the names of various supporting files, the time interval to check for new messages, and other settings, such as whether to remember the user's password or to prompt the user for the password during each logon. A successful logon is required to enable the client's use of the MAPI system.

After establishing a MAPI session, the client can use the MAPI services. MAPI defines three primary services: address books, transports, and message stores.

An address book service is similar to a telephone directory. The address book can be thought of as a persistent database that contains valid addressing information. An entry in the address book is called an address entry and consists of a display name, an e-mail type, and an e-mail address. The display name refers to the name, such as a person's full name, that an application displays to its users. You can provide a display name, and the address book service looks up the display name and provides the corresponding messaging system address.

A transport supports communication between different devices and different underlying messaging systems.

A message store stores messages in a hierarchical structure that consists of one or more folders. A folder can be a personal folder that contains an individual's messages, or a public folder, similar to a bulletin board or online forum, that is accessible to many users. Each folder can contain messages or other folders.

A message represents a communication that is sent from the sender to one or more recipients or that gets posted in a public folder. A message can include one or more attachments, which are attached to and sent with the message. An attachment can be the contents of a file, a link to a file, an OLE object, or another message.

Several properties can be associated with a message: its subject, its importance, its delivery properties (such as the time it is sent and received), and whether to notify the sender when the message is delivered and read. Some message properties identify the message as part of a conversation. The conversation properties allow you to group related messages and identify the sequence of comments and replies in the thread of the conversation.

The message can have one or more recipients. A recipient can be an individual or a distribution list. A distribution list can contain individuals and other distribution lists. For messages that are posted to public folders, the recipient can also be the public folder itself. Before sending a message, you should resolve each recipient; this means you should check each recipient against the address book to make sure its e-mail address is valid.