Message Envelope

Applies to: Outlook 2013 | Outlook 2016

RFC 822 headers are mapped to MAPI properties as follows. PR_SENDER_* is an abbreviation for the following 5 properties:

PR_SENDER_NAME (PidTagSenderName)

PR_SENDER_ADDRTYPE (PidTagSenderAddressType)

PR_SENDER_EMAIL_ADDRESS (PidTagSenderEmailAddress)

PR_SENDER_SEARCH_KEY (PidTagSenderSearchKey)

PR_SENDER_ENTRYID (PidTagSenderEntryId)

Similar abbreviations are used for PR_SENT_REPRESENTING_* and other groups of message properties.

SMTP header MAPI property
From:
Outbound: PR_SENDER_*; inbound: PR_SENDER_* and PR_SENT_REPRESENTING_*
Date:
Outbound: current time; inbound: PR_MESSAGE_DELIVERY_TIME (PidTagMessageDeliveryTime)
To:
PR_DISPLAY_NAME (PidTagDisplayName) and PR_EMAIL_ADDRESS (PidTagEmailAddress) for recipients where PR_RECIPIENT_TYPE (PidTagRecipientType) is MAPI_TO
Cc:
PR_DISPLAY_NAME and PR_EMAIL_ADDRESS for recipients where PR_RECIPIENT_TYPE is MAPI_CC
Bcc:
PR_DISPLAY_NAME and PR_EMAIL_ADDRESS for recipients where PR_RECIPIENT_TYPE is MAPI_BCC
Received:
No corresponding MAPI property; put local host name and your component name here
Return-receipt-to:
PR_REPORT_NAME (PidTagReportName) and PR_REPORT_ENTRYID (PidTagReportEntryId)
Reply-to:
PR_REPLY_RECIPIENT_ENTRIES (PidTagReplyRecipientEntries) and PR_REPLY_RECIPIENT_NAMES (PidTagReplyRecipientNames)
Subject:
PR_SUBJECT (PidTagSubject) No particular length limitation.
MIME-version:
Always "1.0"
X-MS-Attachment:
For compatibility with MS Mail SMTP gateway. _filename size mm-dd-yyy hh:mm_Details below.
entire SMTP message envelope
PR_TRANSPORT_MESSAGE_HEADERS (PidTagTransportMessageHeaders)
header name TBD
PR_SEND_RICH_INFO (PidTagSendRichInfo) _for sender only._The TBDheader should be used to determine whether the sender is capable of interpreting TNEF content in a reply.
MessageID:
PR_TNEF_CORRELATION_KEY (PidTagTnefCorrelationKey)
Content-type
Either text/plain or multipart/mixed. See "Message Content" section.

The X-MS-Attachment header is formatted as four tokens, separated by a space:

name size date time

The first token is the filename, which may contain embedded spaces, so this header should be parsed from the right on inbound messages. The size is in bytes; the date is formatted as mm-dd-yyyy, and the time as hh:mm.

Note

MessageID is not mapped to PR_SEARCH_KEY because the SMTP domain has specific requirements on the format of the message identifier which make it impossible to encode an arbitrary MAPI message identifier. Instead, MessageID is mapped to PR_TNEF_CORRELATION_KEY. This property is a transport-defined property that is set by the transport sending an outbound message and used by a transport receiving an inbound message. For more information, see Developing a TNEF-Enabled Transport Provider.