Ejemplo n.º 1
0
        /// <summary>
        ///   Attempt to notify the application that automatic sasl authentication is not possible.
        ///   The ManualSaslAuthenticationRequired event will be thrown.
        /// </summary>
        /// <param name = "credential">The credentials provided by the user.</param>
        /// <param name = "client">The current instance of the client, responsible for the connection.</param>
        internal bool InvokeManualSaslAuthenticationRequired(NetworkCredential credential, ImapClient client)
        {
            var handler = ManualSaslAuthenticationRequired;

            if (handler != null)
            {
                var e = new ManualSaslAuthenticationRequiredEventArgs(credential, client);
                handler(this, e);
                return(e.IsAuthenticated);
            }
            return(false);
        }
Ejemplo n.º 2
0
 private static void AuthenticateManually(ManualSaslAuthenticationRequiredEventArgs e, Account account)
 {
     //new GmailAuthenticator().Authenticate(e.Client, e.UserCredentials, account);
 }
Ejemplo n.º 3
0
 /// <summary>
 ///   Attempt to notify the application that automatic sasl authentication is not possible.
 ///   The ManualSaslAuthenticationRequired event will be thrown.
 /// </summary>
 /// <param name = "credential">The credentials provided by the user.</param>
 /// <param name = "client">The current instance of the client, responsible for the connection.</param>
 internal bool InvokeManualSaslAuthenticationRequired(NetworkCredential credential, ImapClient client)
 {
     var handler = ManualSaslAuthenticationRequired;
     if (handler != null) {
         var e = new ManualSaslAuthenticationRequiredEventArgs(credential, client);
         handler(this, e);
         return e.IsAuthenticated;
     }
     return false;
 }