Edit

Share via


Setting Properties on Incoming Messages

Applies to: Outlook 2013 | Outlook 2016

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 (PidTagSubject)
The subject of the message.
PR_BODY (PidTagBody)
Plain text message text.
PR_RTF_COMPRESSED (PidTagRtfCompressed)
Compressed RTF message text.
PR_MESSAGE_DELIVERY_TIME (PidTagMessageDeliveryTime)
The date and time the message was delivered.
PR_SENDER_NAME (PidTagSenderName)
The display name of the message originator.
PR_SENDER_ENTRYID (PidTagSenderEntryId)
The address book entry of the message originator.
PR_SENDER_SEARCH_KEY (PidTagSenderSearchKey)
The address book search key of the message originator.
PR_CLIENT_SUBMIT_TIME (PidTagClientSubmitTime)
The time that the message was submitted to its messaging system by the sender's messaging client.
PR_SENT_REPRESENTING_NAME (PidTagSentRepresentingName)
The name of the representative delegate for sending.
PR_SENT_REPRESENTING_ENTRYID (PidTagSentRepresentingEntryId)
The address book entry of the sending delegate.
PR_SENT_REPRESENTING_SEARCH_KEY (PidTagSentRepresentingSearchKey)
The address book search key of the sending delegate.
PR_RCVD_REPRESENTING_NAME (PidTagReceivedRepresentingName)
The name of the representative delegate for receiving.
PR_RCVD_REPRESENTING_ENTRYID (PidTagReceivedRepresentingEntryId)
The address book entry of the receiving delegate.
PR_RCVD_REPRESENTING_SEARCH_KEY (PidTagReceivedRepresentingSearchKey)
The address book search key of the receiving delegate.
PR_REPLY_RECIPIENT_NAMES (PidTagReplyRecipientNames)
The list of delegated recipient display names, separated by a semicolon and space ("; ").
PR_REPLY_RECIPIENT_ENTRIES (PidTagReplyRecipientEntries)
The list of delegated recipients for a reply.
PR_MESSAGE_TO_ME (PidTagMessageToMe)
Indicates that the recipient was specifically named as a "to" recipient (not in a group).
PR_MESSAGE_CC_ME (PidTagMessageCcMe)
Indicates that the recipient was specifically named as a "cc" recipient (not in a group).
PR_MESSAGE_RECIP_ME (PidTagMessageRecipientMe)
Indicates that the recipient was specifically named as a "to", "cc" or "bcc" recipient (not in a group).

Providers that 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 of properties to the same values as the PR_RECEIVED_BY group, and can 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 property can be generated, if necessary, by calling the IMAPISupport::CreateOneOff method. The PR_SEARCH_KEY group of 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 changing the result to uppercase. The Windows API function 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 email addresses.