示例#1
0
文件: Program.cs 项目: dblock/sncore
 static void Main(string[] args)
 {
     SmtpMock mock = new SmtpMock();
     mock.Started += new SmtpMock.StartHandler(mock_Start);
     mock.Error += new SmtpMock.ExceptionHandler(Exception);
     mock.Sent += new SmtpSession.DataHandler(mock_Sent);
     mock.Received += new SmtpSession.DataHandler(mock_Received);
     mock.End += new SmtpSession.EndHandler(mock_End);
     mock.Start();
     mock.Wait();
 }
示例#2
0
文件: Program.cs 项目: dblock/sncore
 static void mock_Start(SmtpMock sender, TcpListener listener)
 {
     Console.WriteLine("== Listening on {0}", listener.LocalEndpoint);
 }
示例#3
0
文件: Program.cs 项目: dblock/sncore
 static void Exception(SmtpMock mock, Exception ex)
 {
     Console.WriteLine(ex.Message);
 }