Joshi.Utils.Imap.Imap.LogOut C# (CSharp) Method

LogOut() public method

Logout the user: It logout the user and disconnect the connetion from IMAP server.
public LogOut ( ) : void
return void
        public void LogOut()
        {
            if (m_bIsLoggedIn)
            {
                ImapResponseEnum eImapResponse;
                ArrayList asResultArray = new ArrayList();
                string sCommand = IMAP_LOGOUT_COMMAND;
                sCommand += IMAP_COMMAND_EOL;
                try
                {
                    eImapResponse = SendAndReceive(sCommand, ref asResultArray);
                }
                catch (Exception e)
                {
                    Disconnect();
                    m_bIsLoggedIn = false;
                    throw e;
                }
                Disconnect();
                m_bIsLoggedIn = false;
            }
        }