Example #1
0
        /// <summary>Does a Logon with SSL.</summary>
        /// <param name="user">The user.</param>
        /// <param name="password">The password.</param>
        /// <param name="server">The server.</param>
        /// <param name="port">The port.</param>
        public void LoginSSL(string user, string password, string server, int port = 993)
        {
            var sslClient = new SslClient();

            sslClient.Connect(server, port);
            sslClient.DoClientTLS(server);
            stream = sslClient.Stream;
            Login(user, password);
        }