I would like to save a boolean property on an email. If user clicked on my addin button, i'd like to mark selected email as treated. Using UserProperties of MailItem class will update it on local folder.
Thank you very much
Any property you read or set using the Outlook Object Model, you can access using EWS. Outlook user properties values are stored as regular named MAPI properties; they are stored on the items on the server, not just locally.
You just need to request the extended property when reading the data. See https://learn.microsoft.com/en-us/previous-versions/office/developer/exchange-server-2010/dd633697(v%3Dexchg.80).
You can see existing properties and their values in OutlookSpy (I am its author) - click IMessage button to see the properties on the MAPI level (you can also see DASL property names that you will need to use in EWS). Or click EWS | GetItem to see the data on the EWS level.