Setting Properties on Incoming Messages

The client applications within the MAPI subsystem expect a number of properties in any received message. When the transport provider brings a message into MAPI, it should set these properties, since it is either the only process with the necessary information to do so, or is at least the best source of the information.

Providers are encouraged to set the values for all of these properties in incoming messages.

Property Name Description
PR_SUBJECT Subject of the message.
PR_BODY Plain text message text.
PR_RTF_COMPRESSED Compressed RTF message text.
PR_MESSAGE_DELIVERY_TIME Date and time the message was delivered.
PR_SENDER_NAME Display name of the message originator.
PR_SENDER_ENTRYID Address book entry of the message originator.
PR_SENDER_SEARCH_KEY Address book search key of the message originator.
PR_CLIENT_SUBMIT_TIME The time that the message was submitted to its messaging system by the sender's messaging client.
PR_SENT_REPRESENTING_NAME Name of the representative delegate for sending.
PR_SENT_REPRESENTING_ENTRYID Address book entry of the sending delegate.
PR_SENT_REPRESENTING_SEARCH_KEY Address book search key of the sending delegate.
PR_RCVD_REPRESENTING_NAME Name of the representative delegate for receiving.
PR_RCVD_REPRESENTING_ENTRYID Address book entry of the receiving delegate.
PR_RCVD_REPRESENTING_SEARCH_KEY Address book search key of the receiving delegate.
PR_REPLY_RECIPIENT_NAMES List of delegated recipient display names, separated by a semicolon and space "; ".
PR_REPLY_RECIPIENT_ENTRIES List of delegated recipients for a reply.
PR_MESSAGE_TO_ME Indicates that the recipient was specifically named as a To recipient (not in a group).
PR_MESSAGE_CC_ME Indicates that the recipient was specifically named as a Cc recipient (not in a group).
PR_MESSAGE_RECIP_ME Indicates that the recipient was specifically named as a To, Cc or Bcc recipient (not in a group).

Providers which have no apparent mappings can set the PR_SENT_REPRESENTING group of properties to the same values as the PR_SENDER group, the PR_RCVD_REPRESENTING group to the same values as the PR_RECEIVED_BY group, and build the PR_REPLY_RECIPIENT group of properties based on the values of the PR_SENDER group. For example, PR_SENT_REPRESENTING_NAME can be set to the same value as PR_SENDER_NAME.

The PR_ENTRYID or PR_ENTRYLIST properties can be generated if necessary by calling the IMAPISupport::CreateOneOff method. The PR_SEARCH_KEY properties can be generated by concatenating the PR_ADDRTYPE property associated with a user, a colon ':', and the PR_EMAIL_ADDRESS property associated with the user, then folding the result to uppercase. The Windows API CharUpperBuff is a convenient function to use for this purpose. What is required of this process is to make a canonical form of the address that can be compared as a binary quantity. Note that this is not necessary if the transport provider is case-sensitive with respect to e-mail addresses.