// There was an unrecoverable error in UTF7IMAP -> UTF8 conversion.
const UTF7IMAP_CONVERSION = 3;
- // The IMAP server ended the connection.
- const IMAP_DISCONNECT = 4;
+ // The server ended the connection.
+ const DISCONNECT = 4;
// The charset used in the search query is not supported on the server.
const BADCHARSET = 5;
} else {
$this->_temp['logout'] = true;
$this->logout();
- throw new Horde_Imap_Client_Exception('IMAP Server closed the connection: ' . implode(' ', array_slice($read, 1)), Horde_Imap_Client_Exception::IMAP_DISCONNECT);
+ throw new Horde_Imap_Client_Exception('IMAP Server closed the connection: ' . implode(' ', array_slice($read, 1)), Horde_Imap_Client_Exception::DISCONNECT);
}
}
if ($this->_debug) {
fwrite($this->_debug, '[ERROR: IMAP server closed the connection.]' . "\n");
}
- throw new Horde_Imap_Client_Exception('IMAP server closed the connection unexpectedly.', Horde_Imap_Client_Exception::IMAP_DISCONNECT);
+ throw new Horde_Imap_Client_Exception('IMAP server closed the connection unexpectedly.', Horde_Imap_Client_Exception::DISCONNECT);
}
$data = '';
stream_set_timeout($this->_stream, $this->_params['timeout']);
+ // Add separator to make it easier to read debug log.
+ if ($this->_debug) {
+ fwrite($this->_debug, str_repeat('-', 30) . "\n");
+ }
+
$line = $this->_getLine();
// Check for string matching APOP timestamp
if (feof($this->_stream)) {
$this->logout();
- throw new Horde_Imap_Client_Exception('POP3 Server closed the connection unexpectedly.', Horde_Imap_Client_Exception::IMAP_DISCONNECT);
+ throw new Horde_Imap_Client_Exception('POP3 Server closed the connection unexpectedly.', Horde_Imap_Client_Exception::DISCONNECT);
}
$read = rtrim(fgets($this->_stream));
/**
* Obtain multiline input.
*
- * @param boolean $retarray Return an arrray?
+ * @param boolean $retarray Return an array?
*
* @return mixed An array if $retarray is true, a string otherwise.
* @throws Horde_Imap_Client_Exception