EWS: How to Update the IsRead EmailMessage Property

How to update the IsRead property of an IsRead object using EWS or another method?

Just setting mail.IsRead=true doesn't seem to be saved.

+8
c # exchangewebservices
source share
2 answers

Well, no one answered my question after I posted it for about 1 hour, which is pretty unusual, but I found a solution. Hope this helps others who are confused about this issue.

 mail.IsRead=true; mail.Update(ConflictResolutionMode.AutoResolve); 

What is it. The key is you need to update the item or EmailMessage after setting the IsRead property.

+11
source share

A bit late, but here is a more detailed code example:

 // if the property is not loaded yet, first load it mail.Load(PropertySet(BasePropertySet.IdOnly, EmailMessageSchema.IsRead)); if (!mail.IsRead) // check that you don't update and create unneeded traffic { mail.IsRead = true; // mark as read mail.Update(ConflictResolutionMode.AutoResolve); // persist changes } 
+1
source share