Login to the IMAP server with the given username and password. You must first connect to the server with {@link org.apache.commons.net.SocketClient#connect connect }before attempting to login. A login attempt is only valid if the client is in the NOT_AUTH_STATE. After logging in, the client enters the AUTH_STATE.
@param username The account name being logged in to.
@param password The plain text password of the account.
@return True if the login attempt was successful, false if not.
@exception IOException If a network I/O error occurs in the process oflogging in.