isImap() only returns true if IMAP server is connected to. false is an undefined event