Table of Contents

Class PostItem

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

Represents a post item. Properties available on post items are defined in the PostItemSchema class.

public sealed class PostItem : Item
Inheritance
PostItem
Inherited Members

Constructors

PostItem(ExchangeService)

Initializes an unsaved local instance of PostItem. To bind to an existing post item, use PostItem.Bind() instead.

public PostItem(ExchangeService service)

Parameters

service ExchangeService

The ExchangeService object to which the e-mail message will be bound.

Properties

ConversationIndex

Gets the conversation index of the post item.

public byte[] ConversationIndex { get; }

Property Value

byte[]

ConversationTopic

Gets the conversation topic of the post item.

public string ConversationTopic { get; }

Property Value

string

From

Gets or sets the "on behalf" poster of the post item.

public EmailAddress From { get; set; }

Property Value

EmailAddress

InternetMessageId

Gets the Internet message Id of the post item.

public string InternetMessageId { get; }

Property Value

string

IsRead

Gets or sets a value indicating whether the post item is read.

public bool IsRead { get; set; }

Property Value

bool

PostedTime

Gets the the date and time when the post item was posted.

public DateTime PostedTime { get; }

Property Value

DateTime

References

Gets or sets the references of the post item.

public string References { get; set; }

Property Value

string

Sender

Gets or sets the sender (poster) of the post item.

public EmailAddress Sender { get; set; }

Property Value

EmailAddress

Methods

Bind(ExchangeService, ItemId)

Binds to an existing post item and loads its first class properties. Calling this method results in a call to EWS.

public static PostItem Bind(ExchangeService service, ItemId id)

Parameters

service ExchangeService

The service to use to bind to the post item.

id ItemId

The Id of the post item to bind to.

Returns

PostItem

An PostItem instance representing the post item corresponding to the specified Id.

Bind(ExchangeService, ItemId, PropertySet)

Binds to an existing post item and loads the specified set of properties. Calling this method results in a call to EWS.

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

Parameters

service ExchangeService

The service to use to bind to the post item.

id ItemId

The Id of the post item to bind to.

propertySet PropertySet

The set of properties to load.

Returns

PostItem

An PostItem instance representing the post item corresponding to the specified Id.

CreateForward()

Creates a forward response to the post item.

public ResponseMessage CreateForward()

Returns

ResponseMessage

A ResponseMessage representing the forward response that can subsequently be modified and sent.

CreatePostReply()

Creates a post reply to this post item.

public PostReply CreatePostReply()

Returns

PostReply

A PostReply that can be modified and saved.

CreateReply(bool)

Creates a e-mail reply response to the post item.

public ResponseMessage CreateReply(bool replyAll)

Parameters

replyAll bool

Indicates whether the reply should go to everyone involved in the thread.

Returns

ResponseMessage

A ResponseMessage representing the e-mail reply response that can subsequently be modified and sent.

Forward(MessageBody, params EmailAddress[])

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

public void Forward(MessageBody bodyPrefix, params EmailAddress[] toRecipients)

Parameters

bodyPrefix MessageBody

The prefix to prepend to the original body of the post item.

toRecipients EmailAddress[]

The recipients to forward the post item to.

Forward(MessageBody, IEnumerable<EmailAddress>)

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

public void Forward(MessageBody bodyPrefix, IEnumerable<EmailAddress> toRecipients)

Parameters

bodyPrefix MessageBody

The prefix to prepend to the original body of the post item.

toRecipients IEnumerable<EmailAddress>

The recipients to forward the post item to.

PostReply(MessageBody)

Posts a reply to this post item. Calling this method results in a call to EWS.

public void PostReply(MessageBody bodyPrefix)

Parameters

bodyPrefix MessageBody

Body prefix.

Reply(MessageBody, bool)

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

public void Reply(MessageBody bodyPrefix, bool replyAll)

Parameters

bodyPrefix MessageBody

The prefix to prepend to the original body of the post item.

replyAll bool

Indicates whether the reply should be sent to everyone involved in the thread.