O365 EWS API - search one or more mailboxes for specific email, check if read? RRS feed

  • Question

  • Howdy All - 

    Can anyone point me as to how you can search a single or multiple mailboxes for a specific email by sender or subject to find out if the email was read?

    I have scoured the net and can not find anything related to this for O365 or even Exchange 2013.



    Wednesday, March 11, 2015 3:10 AM

All replies

  • You could use EWS to search mailboxes. https://msdn.microsoft.com/EN-US/library/office/dn579422(v=exchg.150).aspx. You can easily check the IsRead property on mail items.

    However, I would point out that finding out if a mail is read is somewhat troublesome. How do you know a mail was read? If it is marked read? Users can toggle the read/unread state of a message, so that's kind of unreliable. You can also right-click a folder and choose "Mark all as read", without ever actually reading the message. So depending on what you're trying to do, this may not be something you can programmatically determine.

    Wednesday, March 11, 2015 2:29 PM
  • I have been reading through the article and testing some of the examples. Is it possible to do this using Powershell or only using C#?

    I can see the IsRead property that you referred to, but how do I put a search together that will search a list of mailboxes listed in a csv or text file?

    Wednesday, March 25, 2015 10:32 PM