コード例 #1
0
        public bool Authenticate(NetworkCredential credentials, SaslMechanics mechanic = (SaslMechanics)0x0000)
        {
            var authenticator = new SmtpAuthenticator(this);

            if (mechanic != 0x0000)
            {
                IsAuthenticated = authenticator.Authenticate(credentials, mechanic);
                return(IsAuthenticated);
            }

            IsAuthenticated = authenticator.CanAuthenticate ?
                              authenticator.Authenticate(credentials) :
                              InvokeManualSaslAuthenticationRequired(credentials, this);
            return(IsAuthenticated);
        }
コード例 #2
0
ファイル: SmtpClient.cs プロジェクト: pravse/CommSample
 public bool AuthenticateXOAuth(string key)
 {
     IsAuthenticated = new SmtpAuthenticator(this).AuthenticateXOAuth(key);
     return IsAuthenticated;
 }
コード例 #3
0
ファイル: SmtpClient.cs プロジェクト: pravse/CommSample
        public bool Authenticate(NetworkCredential credentials, SaslMechanics mechanic = (SaslMechanics) 0x0000)
        {
            var authenticator = new SmtpAuthenticator(this);

            if (mechanic != 0x0000) {
                IsAuthenticated = authenticator.Authenticate(credentials, mechanic);
                return IsAuthenticated;
            }

            IsAuthenticated = authenticator.CanAuthenticate ?
                                                                authenticator.Authenticate(credentials) :
                                                                                                            InvokeManualSaslAuthenticationRequired(credentials, this);
            return IsAuthenticated;
        }
コード例 #4
0
 public bool AuthenticateXOAuth(string key)
 {
     IsAuthenticated = new SmtpAuthenticator(this).AuthenticateXOAuth(key);
     return(IsAuthenticated);
 }