Ejemplo n.º 1
0
        public static void Run()
        {
            const string mailboxUri = "https://exchnage/ews/exchange.asmx";
            const string domain     = @"";
            const string username   = @"*****@*****.**";
            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
        }