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"));
        }
        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");
        }