Exemplo n.º 1
0
        //connect to Mail server throught POP3
        public static bool TestPopConnect(string host, int port, string username, string password, ref string error)
        {
            popClient = new MailMan();
            if (!popClient.UnlockComponent("MAIL-TEAMBEAN_4895F76A292K"))
                return false;
            popClient.MailHost = host;
            popClient.MailPort = port;
            popClient.PopUsername = username;
            popClient.PopPassword = password;

            if (SSL)
                popClient.PopSsl = true;
            else
                popClient.PopSsl = false;

            if (!popClient.VerifyPopConnection())
            {
                error = "Server";
                return false;
            }
            if (!popClient.VerifyPopLogin())
            {
                error = "Account";
                return false;
            }
            return true;
        }