Search code examples
c#lumisoft

Lumisoft login verification


Is there a way to retrieve log in information after logging in to outlook with lumisoft? This is my code

private void Connect()
        {
            string m_pUserName = "user@hotmail.com";
            string m_pPassword = "pass";
            string m_pServer = "imap-mail.outlook.com";


            IMAP_Client imap = new IMAP_Client();
            try
            {
                imap.Logger = new Logger();
                imap.Connect(m_pServer, 993, true);

                imap.Login(m_pUserName, m_pPassword);

                MessageBox.Show(imap.GreetingText);

            }
            catch (Exception x)
            {
                MessageBox.Show(this, "IMAP server returned: " + x.Message + " !", "Error:", MessageBoxButtons.OK, MessageBoxIcon.Error);
                imap.Dispose();
            }

        }

If the credentials are wrong it will eventually throw an exception. However if they are correct I want to retrieve informations other than GreetingText. For example email and password of the user logged in etc.

Any tips?


Solution

  • Most of the informations I was searching, not all, are in IMAP_Client.AuthenticatedUserIdentity so imap.AuthenticatedUserIdentity will give me most of the things I am looking for. Thanks and sorry for troubles.