I'm trying to retrieve Inbox items from a specific mailbox (in which i have permissions), using Exchange Web Services managed API. I've tested the code first using my own email address via AutodiscoverUrl, and it works fine. However when i tried using the other email address, EWS still retrieves my own inbox items. Is this due to a cache or something?
My code is as follows:
ExchangeService ex = new ExchangeService(ExchangeVersion.Exchange2010_SP1);
ex.AutodiscoverUrl("[email protected]");
FindItemsResults<Item> findResults = ex.FindItems(WellKnownFolderName.Inbox, new ItemView(10));
foreach (Item item in findResults.Items)
Console.WriteLine(item.Subject);