public static void Run()
{
// ExStart:AccessAnotherMailboxUsingExchangeWebServiceClient
// Create instance of EWSClient class by giving credentials
IEWSClient client = EWSClient.GetEWSClient("https://outlook.office365.com/ews/exchange.asmx", "testUser", "pwd", "domain");
// Get Exchange mailbox info of other email account
ExchangeMailboxInfo mailboxInfo = client.GetMailboxInfo("[email protected]");
// ExEnd:AccessAnotherMailboxUsingExchangeWebServiceClient
}
}