Aspose.Email.Examples.CSharp.Email.IMAP.RenamingFolders.Run C# (CSharp) Метод

Run() публичный статический Метод

public static Run ( ) : void
Результат void
        public static void Run()
        {
            //ExStart:RenamingFolders
            // Create an instance of the ImapClient class
            ImapClient client = new ImapClient();

            // Specify host, username and password, port and SecurityOptions for your client
            client.Host = "imap.gmail.com";
            client.Username = "[email protected]";
            client.Password = "your.password";
            client.Port = 993;
            client.SecurityOptions = SecurityOptions.Auto;
            try
            {
                // Rename a folder and Disconnect to the remote IMAP server
                client.RenameFolder("Aspose", "Client");
                client.Dispose();
            }
            catch (Exception ex)
            {
                Console.Write(Environment.NewLine + ex);
            }
            //ExEnd:RenamingFolders
            Console.WriteLine(Environment.NewLine + "Renamed folders on IMAP server.");
        }
    }
RenamingFolders