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
serviceExchangeServiceThe 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
From
Gets or sets the "on behalf" poster of the post item.
public EmailAddress From { get; set; }
Property Value
InternetMessageId
Gets the Internet message Id of the post item.
public string InternetMessageId { get; }
Property Value
IsRead
Gets or sets a value indicating whether the post item is read.
public bool IsRead { get; set; }
Property Value
PostedTime
Gets the the date and time when the post item was posted.
public DateTime PostedTime { get; }
Property Value
References
Gets or sets the references of the post item.
public string References { get; set; }
Property Value
Sender
Gets or sets the sender (poster) of the post item.
public EmailAddress Sender { get; set; }
Property Value
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
serviceExchangeServiceThe service to use to bind to the post item.
idItemIdThe 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
serviceExchangeServiceThe service to use to bind to the post item.
idItemIdThe Id of the post item to bind to.
propertySetPropertySetThe 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
replyAllboolIndicates 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
bodyPrefixMessageBodyThe prefix to prepend to the original body of the post item.
toRecipientsEmailAddress[]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
bodyPrefixMessageBodyThe prefix to prepend to the original body of the post item.
toRecipientsIEnumerable<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
bodyPrefixMessageBodyBody 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
bodyPrefixMessageBodyThe prefix to prepend to the original body of the post item.
replyAllboolIndicates whether the reply should be sent to everyone involved in the thread.