2017 Project: Documented Code Samples

In an effort to empower more people across the planet to learn, but for it not to be an arduous journey in doing so, I’ve started heavily commenting code so that people can learn from it. This will be the first of many code ventures that I attempt to do and then share with comments,…


C# + EWS: Autodiscover Test (Exchange and O365)

In times of troubleshooting client-side issues, it may become necessary to query for the autodiscover response the user is receiving from either Exchange on-premises or Exchange in O365 – or, in the case of a redirection, both on-premises and O365 Exchange. This is a sample C#.NET Console Application, which will query for the Autodiscover response and use…


O365 & EWS: EmailMessage.SetExtendedProperty() Introduces Undesirable Behavior for Cloud

In Office 365, there is a known issue where Item.SetExtendedProperty() will prevent ResponseMessage.SendAndSaveCopy() from working correctly. Instead of sending the messaging and placing the item in the 'Sent Items' folder, the message will be sent and remain in the 'Drafts' folder. This issue can be corrected by changing the source code of the EWS application in either of the…


EWS: Obtaining Mail Item from List

In troubleshooting an issue for a customer, I ran into a problem: I could obtain the data from the MAPI store (via EWS) but I was unable to figure out how to cast from the list of items obtained to an actual message to action against. For example, here’s where I was attempting to obtain…