Пример #1
0
        public void IfStlsRequiredLogonShouldSucceedIfStls()
        {
            var imapSimulator = new IMAPClientSimulator(false, 14303);
             imapSimulator.Connect();
             imapSimulator.SendSingleCommand("A01 STARTTLS");
             imapSimulator.Handshake();

             // command is sent over TLS.
             imapSimulator.GetCapabilities();

             CustomAssert.IsTrue(imapSimulator.Logon(_account.Address, "test"));
        }
Пример #2
0
        public void StlsCommandShouldSwithToTls()
        {
            var imapSimulator = new IMAPClientSimulator(false, 14302);
             imapSimulator.Connect();
             var data = imapSimulator.GetCapabilities();
             imapSimulator.SendSingleCommand("A01 STARTTLS");
             imapSimulator.Handshake();

             // command is sent over TLS.
             imapSimulator.GetCapabilities();

             imapSimulator.Logon(_account.Address, "test");
        }