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

Run() public static method

public static Run ( ) : void
return void
        public static void Run()
        {
            // ExStart:AddingHeadersToEWSRequests
            using (IEWSClient client = EWSClient.GetEWSClient("exchange.domain.com/ews/Exchange.asmx", "username", "password", ""))
            {
                client.AddHeader("X-AnchorMailbox", "[email protected]");
                ExchangeMessageInfoCollection messageInfoCol = client.ListMessages(client.MailboxInfo.InboxUri);
            }
            // ExEnd:AddingHeadersToEWSRequests
        }
    }
AddingHeadersToEWSRequests