Beispiel #1
0
 private static void Server_SmtpConnectedSuccessfully(object sender, SmtpConnectionEventArgs e)
 {
     Console.WriteLine("--------------------------------------------------------------------------------");
     Console.WriteLine("Smtp Connected Successfully");
     Console.WriteLine($"    Key....................: {e.SmtpConfiguration.Key}");
     Console.WriteLine($"    Host...................: {e.SmtpConfiguration.Host}");
     Console.WriteLine("--------------------------------------------------------------------------------");
 }
Beispiel #2
0
 private static void Server_SmtpConnectionEnded(object sender, SmtpConnectionEventArgs e)
 {
     Console.WriteLine("--------------------------------------------------------------------------------");
     Console.WriteLine("Smtp Connection Ended");
     Console.WriteLine($"    Key....................: {e.SmtpConfiguration.Key}");
     Console.WriteLine($"    Host...................: {e.SmtpConfiguration.Host}");
     Console.WriteLine($"    Connection Number......: {e.ConnectionNumber}");
     Console.WriteLine("--------------------------------------------------------------------------------");
 }
Beispiel #3
0
        private static void Server_SmtpNotConnected(object sender, SmtpConnectionEventArgs e)
        {
            Console.WriteLine("--------------------------------------------------------------------------------");
            Console.WriteLine("**** ERROR ****: Smtp Connection Failed");
            Console.WriteLine("Exception:");
            Console.WriteLine($"   Error..........: {e.Exception.Message}");
            Console.WriteLine($"   Stack Trace....: {e.Exception.StackTrace}");

            if (e.Exception.InnerException != null)
            {
                Console.WriteLine();
                Console.WriteLine("Inner Exception:");
                Console.WriteLine($"   Error..........: {e.Exception.InnerException.Message}");
                Console.WriteLine($"   Stack Trace....: {e.Exception.InnerException.StackTrace}");
            }

            Console.WriteLine("--------------------------------------------------------------------------------");
            Console.WriteLine();
        }