Email properties and elements in EWS in Exchange

Learn about the first-class and other properties and elements that you can get on email messages by using the EWS Managed API or EWS in Exchange.

Email messages have more than 50 properties, and getting the ones you want, when you want them, can be confusing if you don't know where to look. The most important thing to know about working with email properties and elements is which are included in the set of first-class properties and elements that is returned by each of the main retrieval methods and operations. The set of first-class properties that is returned varies based on the retrieval method that you use. It's also important not to be fooled by the AllProperties value of the BaseShape EWS element, which corresponds to the BasePropertySet.FirstClassMessageProperties enumeration value in the EWS Managed API. This value doesn't actually include all properties, it only includes the first-class properties.

First-class properties and elements for email messages

The set of first-class properties and elements that are returned by the EWS Managed API EmailMessage.Bind method and the EWS GetItem operation is slightly different than the set of first-class properties and elements that is returned by the EWS Managed API ExchangeService.FindItems method and the EWS FindItem operation. The first-class properties returned by the FindItems method and FindItem operation are a subset of the properties returned by the Bind method and GetItem operation. Table 1 lists all the first-class properties returned by the Bind method and the GetItem operation, and specifies which of those are not returned by the FindItems method or FindItem operation. Note that you cannot extend the FindItems method or the FindItem operation to retrieve additional properties and elements such as ToRecipients, CcRecipients, and BccRecipients. If you need to retrieve those values, use the FindItems method or the FindItem operation to get the item IDs of the emails, and then use the Bind method or the GetItem operation, to retrieve the required properties. For code examples that show how to retrieve items by using the Bind or the FindItems method, see Get an item by using the EWS Managed API. For code examples that show how to retrieve items by using the GetItem or FindItem operations, see Get an item by using EWS.

The first-class properties and elements are listed in the following table in the order in which they appear in a response.

Table 1. First-class email properties and elements

EWS Managed API property EWS element First-class property for the FindItems method or the FindItem operation? Read-write or read-only
Id
ItemId
Yes
Read-only
ParentFolderId
ParentFolderId
Yes
Read-only
ItemClass
ItemClass
Yes
Read-write
Subject
Subject
Yes
Read-write
Sensitivity
Sensitivity
Yes
Read-only
Body
Body
No
Read-write
Attachments
Attachments
No
Read-write
DateTimeReceived
DateTimeReceived
Yes
Read-only
Size
Size
Yes
Read-only
Categories
Categories
No
Read-write
Importance
Importance
Yes
Read-write
InReplyTo
InReplyTo
Yes
Read-write
IsSubmitted
IsSubmitted
Yes
Read-only
IsDraft
IsDraft
Yes
Read-only
IsFromMe
IsFromMe
Yes
Read-only
IsResend
IsResend
Yes
Read-only
IsUnmodified
IsUnmodified
Yes
Read-only
InternetMessageHeaders
InternetMessageHeaders
No
Read-only
DateTimeSent
DateTimeSent
Yes
Read-only
DateTimeCreated
DateTimeCreated
Yes
Read-only
AllowedResponseActions
ResponseObjects
No
Read-only
ReminderDueBy
ReminderDueBy
Yes
Read-write
IsReminderSet
ReminderIsSet
Yes
Read-write
ReminderMinutesBeforeStart
ReminderMinutesBeforeStart
Yes
Read-write
DisplayCc
DisplayCc
Yes
Read-only
DisplayTo
DisplayTo
Yes
Read-only
HasAttachments
HasAttachments
Yes
Read-only
Culture
Culture
Yes
Read-write
EffectiveRights
EffectiveRights
Yes
Read-only
LastModifiedName
LastModifiedName
Yes
Read-only
LastModifiedTime
LastModifiedTime
Yes
Read-only
IsAssociated
IsAssociated
Yes
Read-write
WebClientReadFormQueryString
WebClientReadFormQueryString
Yes
Read-only
WebClientEditFormQueryString
WebClientEditFormQueryString
Yes
Read-only
ConversationId
ConversationId
Yes
Read-only
Flag
Flag
Yes
Read-write
InstanceKey
InstanceKey
Yes
Read-only
EntityExtractionResult
EntityExtractionResult
No
Read-only
Sender
Sender
Yes
Read-write
ToRecipients
ToRecipients
No
Read-only
CcRecipients
CcRecipients
No
Read-only
BccRecipients
BccRecipients
No
Read-only
IsReadReceiptRequested
IsReadReceiptRequested
Yes
Read-write
IsDeliveryReceiptRequested
IsDeliveryReceiptRequested
Yes
Read-write
ConversationIndex
ConversationIndex
Yes
Read-only
ConversationTopic
ConversationTopic
Yes
Read-only
From
From
Yes
Read-write
InternetMessageId
InternetMessageId
Yes
Read-only
IsRead
IsRead
Yes
Read-write
IsResponseRequested
IsResponseRequested
Yes
Read-write
ReplyTo
ReplyTo
No
Read-only
References
References
Yes
Read-write
ReceivedBy
ReceivedBy
Yes
Read-only
ReceivedRepresenting
ReceivedRepresenting
Yes
Read-only

Other properties and elements for email messages

Not all important email properties and elements are first-class properties and elements. To get the other properties or elements, you need to add them to your PropertySet if you're using the EWS Managed API, or use a property path to add them to your EWS operation call. For example, to retrieve the text body and the MIME content of a message, create your PropertySet as shown for the Bind or Load method.

PropertySet(BasePropertySet.IdOnly, ItemSchema.TextBody, ItemSchema.MimeContent);

Or if you're using EWS, add the elements to the AdditionalProperties element in your GetItem operation request, as shown.

<t:AdditionalProperties>
    <t:FieldURI FieldURI="item:TextBody" />
    <t:FieldURI FieldURI="item:MimeContent" />
</t:AdditionalProperties>

EmailMessage properties inherited from the EWS Managed API ServiceObject object cannot be included in a property set for the Bind method; however, all the ServiceObject properties are readable on the EmailMessage object and are retrieved by the Bind method.

Table 2. Other email properties and elements

EWS Managed API property EWS element Read-write or read-only
ArchiveTag
ArchiveTag
Read-write
ExtendedProperties
ExtendedProperty
Read-only
IconIndex
IconIndex
Read-only
IsAttachment
Not available
Read-only
IsDirty
Not available
Read-only
IsNew
Not available
Read-only
Item
Item
Read-only
MimeContent
MimeContent
Read-only
Not available
MimeContentUTF8
Read-only
NormalizedBody
NormalizedBody
Read-only
PolicyTag
PolicyTag
Read-write
Preview
Preview
Read-write
RetentionDate
RetentionDate
Read-only
Schema
Not available
Read-only
Service
Not available
Read-only
StoreEntryId
StoreEntryId
Read-only
TextBody
TextBody
Read-only
UniqueBody
UniqueBody
Read-only

See also