Exemplo n.º 1
0
        public void StlsCommandShouldSwithToTls()
        {
            var pop3Simulator = new Pop3ClientSimulator(false, 11002);

            pop3Simulator.Connect();
            string banner;

            pop3Simulator.ReceiveBanner(out banner);
            pop3Simulator.STLS();
            pop3Simulator.Handshake();

            // run over TLS.
            pop3Simulator.HELP();
        }
Exemplo n.º 2
0
        public void IfStlsRequiredLogonShouldSucceedIfStls()
        {
            var pop3Simulator = new Pop3ClientSimulator(false, 11003);

            pop3Simulator.Connect();
            string banner;

            pop3Simulator.ReceiveBanner(out banner);
            pop3Simulator.STLS();
            pop3Simulator.Handshake();

            // run over TLS.
            var result = pop3Simulator.User("*****@*****.**");

            Assert.IsTrue(result.StartsWith("+OK"));
        }