Aspose.Email.Examples.CSharp.Email.Exchange.AccessAnotherMailboxUsingExchangeWebServiceClient.Run C# (CSharp) Method

Run() public static method

public static Run ( ) : void
return void
        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
        }
    }
AccessAnotherMailboxUsingExchangeWebServiceClient