コード例 #1
0
        public static SmtpServer CreateAndBind(IPAddress serverListenAddress, int port)
        {
            var smtpServer = new SmtpServer();

            smtpServer.BindAndListenTo(serverListenAddress, port);
            return(smtpServer);
        }
コード例 #2
0
        public SmtpConnection(SmtpServer server, PortListener portBinding, TcpClient tcpClient)
            : base(portBinding, tcpClient)
        {
            if (server == null)
            {
                throw new ArgumentNullException("server");
            }

            Server = server;
        }