예제 #1
0
        private static void StartSmtpServer()
        {
            EmailServer emailServer;

            do
            {
                Console.WriteLine("Smtp Server running !!!");
                emailServer = new EmailServer(IPAddress.Loopback, 25);
                emailServer.Start();
            } while (emailServer != null);
        }
예제 #2
0
        private static void Main(string[] args)
        {
            int counter = 0;

            EmailServer emailServer;

            do
            {
                if (counter == 0)
                {
                    Console.WriteLine("Smtp Server running !!!");
                    counter++;
                }
                emailServer = new EmailServer(IPAddress.Loopback, 25);
                emailServer.Start();
                while (emailServer.IsThreadAlive)
                {
                    Thread.Sleep(500);
                }
            } while (emailServer != null);
        }