Exemplo n.º 1
0
        public void SendTest()
        {
            var message = Context.GetTestMessage();

            using (var client = new SmtpClient()) {
                client.Security = SecurityPolicies.Implicit;
                client.Connect("smtp.1und1.de", 25);
                client.Authenticate("*****@*****.**", "1111111111");
                client.Send(message);
            }
        }
 public ManualSaslAuthenticationRequiredEventArgs(NetworkCredential credential, SmtpClient client)
 {
     Client = client;
     UserCredential = credential;
 }
Exemplo n.º 3
0
 /// <summary>
 ///   Attempt to notify the application that automatic sasl authentication is not possible.
 ///   The ManualSaslAuthenticationRequired event wil be thrown.
 /// </summary>
 /// <param name = "credential">The credentials provided by the user.</param>
 /// <param name = "client">The current instance of the client, responsiblle for the connection.</param>
 /// <returns>Returns whether the client should cancel the authentication request.</returns>
 private bool InvokeManualSaslAuthenticationRequired(NetworkCredential credential, SmtpClient client)
 {
     var handler = ManualSaslAuthenticationRequired;
     if (handler != null) {
         var e = new ManualSaslAuthenticationRequiredEventArgs(credential, client);
         handler(this, e);
         return e.IsAuthenticated;
     }
     return false;
 }
Exemplo n.º 4
0
 public SmtpResponseReader(SmtpClient client, TimeSpan timeout)
 {
     _client = client;
     _timeout = timeout;
 }
Exemplo n.º 5
0
 public SmtpAuthenticator(SmtpClient client)
 {
     _client = client;
 }