Working with MAPI Messages and Folders

A message always has an associated recipient table, and can also have attachments and embedded messages. Embedded messages have their own PR_MESSAGE_CLASS and PR_SUBJECT properties as well as their own recipient tables. The recipient table has the MAPI properties shown in the following table for each recipient of the message.

Recipient Table Properties

Property Name Description
PR_ADDRTYPE Type of address, for example SMTP.
PR_DISPLAY_NAME Recipient’s display name. For example, “John Doe.”
PR_EMAIL_ADDRESS Recipients’s address in the format indicated by PR_ADDRTYPE. For example “johnd@microsoft.com.”
PR_ENTRYID Entry Identifier with the Microsoft Exchange Server address book for a recipient.
PR_RECIPIENT_NUMBER A recipient’s ordinal number in the recipient list.
PR_RECIPIENT_TYPE Recipient type, MAPI_TO.
PR_SEND_RICH_INFO Recipient is a MAPI recipient.

Note A gateway must always check the recipient table of the embedded MAPI message to find the correct value for the PR_SEND_RICH_INFO property. A message sent to a one-off address through a gateway does not carry this property on its MTE.

MAPI Folders use the IMAPIFolder interface. IMAPIFolder presents methods for accessing a table of messages contained in the folder, and manipulating the contents of that table and its messages.

The following topics discuss working with MAPI messages and folders. For more complete details, see the MAPI Programmers’ Guide. Keep in mind that gateways are a special kind of client application, and as such not all of the information on this subject in the MAPI documentation is directly applicable to gateways.