hMailServer.Shared.Authenticator.AuthenticateUser C# (CSharp) Метод

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

public static AuthenticateUser ( hMailServer application ) : bool
application hMailServer
Результат bool
        public static bool AuthenticateUser(hMailServer.Application application)
        {
            // First try to authenticate using an empty password.
             if (AuthenticateUser(application, ""))
            return true;

             // Try to authenticate using password on command line...
             string [] args = Environment.GetCommandLineArgs();
             foreach (string password in args)
             {
            if (AuthenticateUser(application, password))
               return true;
             }

             while (true)
             {
            formEnterPassword passwordDlg = new formEnterPassword();

            if (passwordDlg.ShowDialog() != System.Windows.Forms.DialogResult.OK)
               return false;

            string password = passwordDlg.Password;

            if (AuthenticateUser(application, password))
               return true;

            MessageBox.Show("Invalid user name or password.", "hMailServer");
             }
        }

Same methods

Authenticator::AuthenticateUser ( hMailServer application, string password ) : bool
Authenticator