From: Michael M Slusarz Date: Sun, 29 Mar 2009 20:14:14 +0000 (-0600) Subject: Better IMAP error reporting X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=29a342a31d69ad2e7d9ad9863fc92dae595bffde;p=horde.git Better IMAP error reporting --- diff --git a/imp/lib/Auth/imp.php b/imp/lib/Auth/imp.php index 351c6ca32..a4294d4cf 100644 --- a/imp/lib/Auth/imp.php +++ b/imp/lib/Auth/imp.php @@ -62,7 +62,11 @@ class Auth_imp extends Auth return true; } catch (Horde_Imap_Client_Exception $e) { IMP::loginLogMessage($e->getMessage(), __FILE__, __LINE__); - $this->_setAuthError(AUTH_REASON_BADLOGIN); + if ($e->getCode() == Horde_Imap_Client_Exception::SERVER_CONNECT) { + $this->_setAuthError(AUTH_REASON_MESSAGE, _("Could not connect to the remote server.")); + } else { + $this->_setAuthError(AUTH_REASON_BADLOGIN); + } return false; } }