Table of Contents

Class Item

Namespace
Microsoft.Exchange.WebServices.Data
Assembly
Microsoft.Exchange.WebServices.dll

Represents a generic item. Properties available on items are defined in the ItemSchema class.

public class Item : ServiceObject
Inheritance
Item
Derived
Inherited Members

Properties

AllowedResponseActions

Gets a value indicating which response actions are allowed on this item. Examples of response actions are Reply and Forward.

public ResponseActions AllowedResponseActions { get; }

Property Value

ResponseActions

ArchiveTag

Gets or sets the archive tag.

public ArchiveTag ArchiveTag { get; set; }

Property Value

ArchiveTag

Attachments

Gets a list of the attachments to this item.

public AttachmentCollection Attachments { get; }

Property Value

AttachmentCollection

Body

Gets or sets the body of this item.

public MessageBody Body { get; set; }

Property Value

MessageBody

Categories

Gets or sets the list of categories associated with this item.

public StringList Categories { get; set; }

Property Value

StringList

ConversationId

Gets the Id of the conversation this item is part of.

public ConversationId ConversationId { get; }

Property Value

ConversationId

Culture

Gets or sets the culture associated with this item.

public string Culture { get; set; }

Property Value

string

DateTimeCreated

Gets the date and time this item was created.

public DateTime DateTimeCreated { get; }

Property Value

DateTime

DateTimeReceived

Gets the time when this item was received.

public DateTime DateTimeReceived { get; }

Property Value

DateTime

DateTimeSent

Gets the date and time this item was sent.

public DateTime DateTimeSent { get; }

Property Value

DateTime

DisplayCc

Gets a text summarizing the Cc receipients of this item.

public string DisplayCc { get; }

Property Value

string

DisplayTo

Gets a text summarizing the To recipients of this item.

public string DisplayTo { get; }

Property Value

string

EffectiveRights

Gets a value indicating the effective rights the current authenticated user has on this item.

public EffectiveRights EffectiveRights { get; }

Property Value

EffectiveRights

EntityExtractionResult

Gets the EntityExtractionResult of the item.

public EntityExtractionResult EntityExtractionResult { get; }

Property Value

EntityExtractionResult

ExtendedProperties

Gets a list of extended properties defined on this item.

public ExtendedPropertyCollection ExtendedProperties { get; }

Property Value

ExtendedPropertyCollection

Flag

Get or set the Flag value for this item.

public Flag Flag { get; set; }

Property Value

Flag

HasAttachments

Gets a value indicating whether the item has attachments.

public bool HasAttachments { get; }

Property Value

bool

IconIndex

Gets the icon index.

public IconIndex IconIndex { get; }

Property Value

IconIndex

Id

Gets the Id of this item.

public ItemId Id { get; }

Property Value

ItemId

Importance

Gets or sets the importance of this item.

public Importance Importance { get; set; }

Property Value

Importance

InReplyTo

Gets or sets the In-Reply-To reference of this item.

public string InReplyTo { get; set; }

Property Value

string

InstanceKey

Gets the item instance key.

public byte[] InstanceKey { get; }

Property Value

byte[]

InternetMessageHeaders

Gets a list of Internet headers for this item.

public InternetMessageHeaderCollection InternetMessageHeaders { get; }

Property Value

InternetMessageHeaderCollection

IsAssociated

Gets a value indicating whether this is an associated item.

public bool IsAssociated { get; }

Property Value

bool

IsAttachment

Gets a value indicating whether the item is an attachment.

public bool IsAttachment { get; }

Property Value

bool

IsDraft

Gets a value indicating whether the item is is a draft. An item is a draft when it has not yet been sent.

public bool IsDraft { get; }

Property Value

bool

IsFromMe

Gets a value indicating whether the item has been sent by the current authenticated user.

public bool IsFromMe { get; }

Property Value

bool

IsNew

Gets a value indicating whether this object is a real store item, or if it's a local object that has yet to be saved.

public override bool IsNew { get; }

Property Value

bool

IsReminderSet

Gets or sets a value indicating whether a reminder is set for this item.

public bool IsReminderSet { get; set; }

Property Value

bool

IsResend

Gets a value indicating whether the item is a resend of another item.

public bool IsResend { get; }

Property Value

bool

IsSubmitted

Gets a value indicating whether the message has been submitted to be sent.

public bool IsSubmitted { get; }

Property Value

bool

IsUnmodified

Gets a value indicating whether the item has been modified since it was created.

public bool IsUnmodified { get; }

Property Value

bool

ItemClass

Gets or sets the custom class name of this item.

public string ItemClass { get; set; }

Property Value

string

LastModifiedName

Gets the name of the user who last modified this item.

public string LastModifiedName { get; }

Property Value

string

LastModifiedTime

Gets the date and time this item was last modified.

public DateTime LastModifiedTime { get; }

Property Value

DateTime

MimeContent

Get or sets the MIME content of this item.

public MimeContent MimeContent { get; set; }

Property Value

MimeContent

NormalizedBody

Gets the normalized body of the item.

public NormalizedBody NormalizedBody { get; }

Property Value

NormalizedBody

ParentFolderId

Gets the Id of the parent folder of this item.

public FolderId ParentFolderId { get; }

Property Value

FolderId

PolicyTag

Gets or sets the policy tag.

public PolicyTag PolicyTag { get; set; }

Property Value

PolicyTag

Preview

Gets the item Preview.

public string Preview { get; }

Property Value

string

ReminderDueBy

Gets or sets the date and time when the reminder is due for this item.

public DateTime ReminderDueBy { get; set; }

Property Value

DateTime

ReminderMinutesBeforeStart

Gets or sets the number of minutes before the start of this item when the reminder should be triggered.

public int ReminderMinutesBeforeStart { get; set; }

Property Value

int

RetentionDate

Gets the retention date.

public DateTime? RetentionDate { get; }

Property Value

DateTime?

Sensitivity

Gets or sets the sensitivity of this item.

public Sensitivity Sensitivity { get; set; }

Property Value

Sensitivity

Size

Gets the size of this item.

public int Size { get; }

Property Value

int

StoreEntryId

Gets the store entry id.

public byte[] StoreEntryId { get; }

Property Value

byte[]

Subject

Gets or sets the subject of this item.

public string Subject { get; set; }

Property Value

string

TextBody

Gets the text body of the item.

public TextBody TextBody { get; }

Property Value

TextBody

UniqueBody

Gets the body part that is unique to the conversation this item is part of.

public UniqueBody UniqueBody { get; }

Property Value

UniqueBody

WebClientEditFormQueryString

Gets the query string that should be appended to the Exchange Web client URL to open this item using the appropriate edit form in a web browser.

public string WebClientEditFormQueryString { get; }

Property Value

string

WebClientReadFormQueryString

Gets the query string that should be appended to the Exchange Web client URL to open this item using the appropriate read form in a web browser.

public string WebClientReadFormQueryString { get; }

Property Value

string

Methods

Bind(ExchangeService, ItemId)

Binds to an existing item, whatever its actual type is, and loads its first class properties. Calling this method results in a call to EWS.

public static Item Bind(ExchangeService service, ItemId id)

Parameters

service ExchangeService

The service to use to bind to the item.

id ItemId

The Id of the item to bind to.

Returns

Item

An Item instance representing the item corresponding to the specified Id.

Bind(ExchangeService, ItemId, PropertySet)

Binds to an existing item, whatever its actual type is, and loads the specified set of properties. Calling this method results in a call to EWS.

public static Item Bind(ExchangeService service, ItemId id, PropertySet propertySet)

Parameters

service ExchangeService

The service to use to bind to the item.

id ItemId

The Id of the item to bind to.

propertySet PropertySet

The set of properties to load.

Returns

Item

An Item instance representing the item corresponding to the specified Id.

Copy(FolderId)

Creates a copy of this item in the specified folder. Calling this method results in a call to EWS.

Copy returns null if the copy operation is across two mailboxes or between a mailbox and a public folder.

public Item Copy(FolderId destinationFolderId)

Parameters

destinationFolderId FolderId

The Id of the folder in which to create a copy of this item.

Returns

Item

The copy of this item.

Copy(WellKnownFolderName)

Creates a copy of this item in the specified folder. Calling this method results in a call to EWS.

Copy returns null if the copy operation is across two mailboxes or between a mailbox and a public folder.

public Item Copy(WellKnownFolderName destinationFolderName)

Parameters

destinationFolderName WellKnownFolderName

The name of the folder in which to create a copy of this item.

Returns

Item

The copy of this item.

Delete(DeleteMode)

Deletes the item. Calling this method results in a call to EWS.

public void Delete(DeleteMode deleteMode)

Parameters

deleteMode DeleteMode

The deletion mode.

Delete(DeleteMode, bool)

Deletes the item. Calling this method results in a call to EWS.

public void Delete(DeleteMode deleteMode, bool suppressReadReceipts)

Parameters

deleteMode DeleteMode

The deletion mode.

suppressReadReceipts bool

Whether to suppress read receipts

Move(FolderId)

Moves this item to a the specified folder. Calling this method results in a call to EWS.

Move returns null if the move operation is across two mailboxes or between a mailbox and a public folder.

public Item Move(FolderId destinationFolderId)

Parameters

destinationFolderId FolderId

The Id of the folder to which to move this item.

Returns

Item

The moved copy of this item.

Move(WellKnownFolderName)

Moves this item to a the specified folder. Calling this method results in a call to EWS.

Move returns null if the move operation is across two mailboxes or between a mailbox and a public folder.

public Item Move(WellKnownFolderName destinationFolderName)

Parameters

destinationFolderName WellKnownFolderName

The name of the folder to which to move this item.

Returns

Item

The moved copy of this item.

RemoveExtendedProperty(ExtendedPropertyDefinition)

Removes an extended property.

public bool RemoveExtendedProperty(ExtendedPropertyDefinition extendedPropertyDefinition)

Parameters

extendedPropertyDefinition ExtendedPropertyDefinition

The extended property definition.

Returns

bool

True if property was removed.

Save()

Saves this item in the default folder based on the item's type (for example, an e-mail message is saved to the Drafts folder). Calling this method results in at least one call to EWS. Mutliple calls to EWS might be made if attachments have been added.

public void Save()

Save(FolderId)

Saves this item in a specific folder. Calling this method results in at least one call to EWS. Mutliple calls to EWS might be made if attachments have been added.

public void Save(FolderId parentFolderId)

Parameters

parentFolderId FolderId

The Id of the folder in which to save this item.

Save(WellKnownFolderName)

Saves this item in a specific folder. Calling this method results in at least one call to EWS. Mutliple calls to EWS might be made if attachments have been added.

public void Save(WellKnownFolderName parentFolderName)

Parameters

parentFolderName WellKnownFolderName

The name of the folder in which to save this item.

SetExtendedProperty(ExtendedPropertyDefinition, object)

Sets the extended property.

public void SetExtendedProperty(ExtendedPropertyDefinition extendedPropertyDefinition, object value)

Parameters

extendedPropertyDefinition ExtendedPropertyDefinition

The extended property definition.

value object

The value.

Update(ConflictResolutionMode)

Applies the local changes that have been made to this item. Calling this method results in at least one call to EWS. Mutliple calls to EWS might be made if attachments have been added or removed.

public void Update(ConflictResolutionMode conflictResolutionMode)

Parameters

conflictResolutionMode ConflictResolutionMode

The conflict resolution mode.

Update(ConflictResolutionMode, bool)

Applies the local changes that have been made to this item. Calling this method results in at least one call to EWS. Mutliple calls to EWS might be made if attachments have been added or removed.

public void Update(ConflictResolutionMode conflictResolutionMode, bool suppressReadReceipts)

Parameters

conflictResolutionMode ConflictResolutionMode

The conflict resolution mode.

suppressReadReceipts bool

Whether to suppress read receipts