Exemplo n.º 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);
        }
Exemplo n.º 2
0
 public bool AuthenticateXOAuth(string key)
 {
     IsAuthenticated = new SmtpAuthenticator(this).AuthenticateXOAuth(key);
     return IsAuthenticated;
 }
Exemplo n.º 3
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;
        }
Exemplo n.º 4
0
 public bool AuthenticateXOAuth(string key)
 {
     IsAuthenticated = new SmtpAuthenticator(this).AuthenticateXOAuth(key);
     return(IsAuthenticated);
 }