开发者

Problem Connecting to OutLook 2007(IMAP server) using ChilKat

开发者 https://www.devze.com 2023-02-04 14:31 出处:网络
I am getting the fallowing error when i am trying to connect to the IMAP outlook mail box programatically(i am able to connect the server but not able to login). I am 100% confident that i am using th

I am getting the fallowing error when i am trying to connect to the IMAP outlook mail box programatically(i am able to connect the server but not able to login). I am 100% confident that i am using the correct username and password.

loginResponse: aaac NO Login Failed received failed login response from IMAP server Failed

Thank you i开发者_JS百科n advance...


In the case of Chilkat component, even if your license key is not valid also you will get same error. Please look at the

Component.LastErrorText

which will have the detals.

Try

        Chilkat.Imap imap = new Chilkat.Imap();
        imap.UnlockComponent("LicenseText");

        // If your IMAP server needs SSL, set the Ssl property = true
        // and set the IMAP port to 993.
        // imap.Ssl = true;
        // imap.Port = 993;
        imap.Connect("IP Address");

        // Login to an email account.
        bool b = imap.Login("username", "password");


Chilkat.Imap imap = new Chilkat.Imap();

            bool success; //string responseString;

            // Anything unlocks the component and begins a fully-functional 30-day trial.
            success = imap.UnlockComponent("Anything for 30-day trial");
            if (success != true)
            {
                MessageBox.Show(imap.LastErrorText);
                return;
            }

            imap.Port = 993;
            imap.Ssl = true;
            // Connect to an IMAP server.

            success = imap.Connect("servername.na.company.org");
            if (success != true)
            {
                MessageBox.Show(imap.LastErrorText);
                return;
            }
            success = imap.IsConnected() ;
            MessageBox.Show("suc"+success);


            success = imap.Login("username", "pwd");


            if (success != true)
            {
                MessageBox.Show(imap.LastErrorText);
                return;
            }

            // Select an IMAP mailbox
            success = imap.SelectMailbox("firstname.lastname@xxxx.com");
            if (success != true)
            {
                MessageBox.Show(imap.LastErrorText);
                return;
            }
0

精彩评论

暂无评论...
验证码 换一张
取 消