Ejemplo n.º 1
0
        public void RunServer()
        {
            MailListener listener = null;

            do
            {
                Console.WriteLine("New MailListener started");
                listener = new MailListener(this, IPAddress.Loopback, 25);
                listener.OutputToFile = true;
                listener.Start();
                while (listener.IsThreadAlive)
                {
                    Thread.Sleep(500);
                }
            } while (listener != null);
        }
Ejemplo n.º 2
0
        public void RunServer(bool outputToFile, string outputFolder)
        {
            MailListener listener = null;
            int          port     = 25;

            do
            {
                Console.WriteLine("New MailListener started on port {0}.", port);
                listener = new MailListener(this, IPAddress.Loopback, port, outputFolder);
                listener.OutputToFile = outputToFile;
                listener.Start();
                while (listener.IsThreadAlive)
                {
                    Thread.Sleep(500);
                }
            } while (listener != null);
        }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            do
            {
                Console.WriteLine("New MailListener started");
                if (listener == null)
                {
                }
                listener = new MailListener(new SMTPServer(),
                IPAddress.Loopback, 25673);

                listener.Start();
                while (listener.IsThreadAlive)
                {
                    Thread.Sleep(500);
                }
            } while (listener != null);
        }
Ejemplo n.º 4
0
        public void RunServer(bool outputToFile)
        {
            MailListener listener = null;
            int port = 25;

            do
            {
                Console.WriteLine("New MailListener started on port {0}.", port);
                listener = new MailListener(this, IPAddress.Loopback, port);
                listener.OutputToFile = outputToFile;
                listener.Start();
                while (listener.IsThreadAlive)
                {
                    Thread.Sleep(500);
                }
            } while (listener != null);

        }