Skip to main content

Posts

Showing posts from June, 2016

EWS Basics: Message Flagging and Marking Messages Read/Unread

Messages that are stored in Exchange can be flagged in a number of ways to indicate different states to the user or as an effective method to prompt the user to action (or make them remember to do something). Unread/Read Flags  The most commonly used Flag in Exchange is the Unread/Read Message flag which is used so when a message arrives in Mailbox a user can track which messages they have read. In EWS this flag is surfaced in the API in the form of a Strongly type property isRead   https://msdn.microsoft.com/en-us/library/office/bb408987(v=exchg.150).aspx  . (The underlying Store property that back this is PidTagMessageFlags property https://msdn.microsoft.com/en-us/library/ee160304(v=exchg.80).aspx   which is a bitwise flag representing many states of a message). The other place the Unread Message flag is surfaced is on the Folder object in the guise of the Unread Item count. So in the below example we Bind to Inbox folder and we...
All sample scripts and source code is provided by for illustrative purposes only. All examples are untested in different environments and therefore, I cannot guarantee or imply reliability, serviceability, or function of these programs.

All code contained herein is provided to you "AS IS" without any warranties of any kind. The implied warranties of non-infringement, merchantability and fitness for a particular purpose are expressly disclaimed.