Move imap folder selection inside getImapClient.
Correctly use getImapClient to handle disconnections and connection recreation.