コード例 #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);
        }
コード例 #2
0
 private static void AuthenticateManually(ManualSaslAuthenticationRequiredEventArgs e, Account account)
 {
     //new GmailAuthenticator().Authenticate(e.Client, e.UserCredentials, account);
 }
コード例 #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;
 }