Пример #1
0
        public Boolean Authenticate()
        {
            if (this._Mode == Pop3AuthenticateMode.Auto)
            {
                if (this.AuthenticateByPop() == true)
                {
                    this._Mode = Pop3AuthenticateMode.Pop;
                    return(true);
                }
                else if (this.AuthenticateByAPop() == true)
                {
                    this._Mode = Pop3AuthenticateMode.APop;
                    return(true);
                }
                return(false);
            }
            else
            {
                switch (this._Mode)
                {
                case Pop3AuthenticateMode.Pop: return(this.AuthenticateByPop());

                case Pop3AuthenticateMode.APop: return(this.AuthenticateByAPop());
                }
            }
            return(false);
        }
Пример #2
0
 public Pop3ClientDefaultSettings()
 {
     this.Port             = 110;
     this.AuthenticateMode = Pop3AuthenticateMode.Pop;
 }
Пример #3
0
 /// POP3メールサーバーへログインします。
 /// <summary>
 /// Log in to pop3 server and return login success or failure as bool.
 /// POP3メールサーバーへログインします。
 /// </summary>
 /// <returns></returns>
 public Boolean TryAuthenticate()
 {
     if (this._Mode == Pop3AuthenticateMode.Auto)
     {
         if (this.TryAuthenticateByPop() == true)
         {
             this._Mode = Pop3AuthenticateMode.Pop;
             return true;
         }
         else if (this.TryAuthenticateByAPop() == true)
         {
             this._Mode = Pop3AuthenticateMode.APop;
             return true;
         }
         return false;
     }
     else
     {
         switch (this._Mode)
         {
             case Pop3AuthenticateMode.Pop: return this.TryAuthenticateByPop();
             case Pop3AuthenticateMode.APop: return this.TryAuthenticateByAPop();
         }
     }
     return false;
 }