From 29a342a31d69ad2e7d9ad9863fc92dae595bffde Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Sun, 29 Mar 2009 14:14:14 -0600 Subject: [PATCH] Better IMAP error reporting --- imp/lib/Auth/imp.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; } } -- 2.11.0