Free Support Forum -

Selecting only new/unread messages with ExchangeClient

We are trying to write a component that would connect to Exchange Server on a predetermined schedule and retrieve any new messages from a specific mailbox.

We have used the ListMessages(folder,query) function, but it returns all messages in the inbox.

Does anybody have a sample query we can use for the 2nd parameter that will only return the unread/new messages from the inbox?

Alternatively, is there a way to determine if a message has been read after retrieving it using the FetchMessage() method?


It is not yet supported in current ExchangeClient. Could you please provide more details about your requirements? We will see if we can make them shortly.


Hi ijoubert,

i haven’t seen anything for this currently, but if you’re still working on the problem hopefully this would help…
you can use a bit of a workaround.
exchangeClient.SetReadFlag() and exchangeClient.MoveItem(). so after you read each item you can move it to a new folder then just read everything in the Inbox each time.