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

Run() public static method

public static Run ( ) : void
return void
        public static void Run()
        {
            const string mailboxUri = "https://exchnage/ews/exchange.asmx";
            const string domain = @"";
            const string username = @"[email protected]";
            const string password = @"password";
            // ExStart:DeleteUserConfiguration
            NetworkCredential credentials = new NetworkCredential(username, password, domain);
            IEWSClient client = EWSClient.GetEWSClient(mailboxUri, credentials);
            Console.WriteLine("Connected to Exchange 2010");
            // Delete User Configuration
            UserConfigurationName userConfigName = new UserConfigurationName("inbox.config", client.MailboxInfo.InboxUri);
            client.DeleteUserConfiguration(userConfigName);
            // ExEnd:DeleteUserConfiguration
        }
    }
DeleteUserConfiguration