| | |
| | | |
| | | $this->options['port'] = $port; |
| | | |
| | | if ($this->options['debug']) |
| | | $this->conn->setDebug(true, array($this, 'debug_handler')); |
| | | |
| | | $attempt = 0; |
| | | do { |
| | | $data = rcmail::get_instance()->plugins->exec_hook('imap_connect', |
| | |
| | | */ |
| | | function get_error_code() |
| | | { |
| | | return ($this->conn) ? $this->conn->errornum : 0; |
| | | return $this->conn->errornum; |
| | | } |
| | | |
| | | |
| | |
| | | */ |
| | | function get_error_str() |
| | | { |
| | | return ($this->conn) ? $this->conn->error : null; |
| | | return $this->conn->error; |
| | | } |
| | | |
| | | |
| | |
| | | */ |
| | | function get_response_code() |
| | | { |
| | | if (!$this->conn) |
| | | return self::UNKNOWN; |
| | | |
| | | switch ($this->conn->resultcode) { |
| | | case 'NOPERM': |
| | | return self::NOPERM; |
| | |
| | | */ |
| | | function get_response_str() |
| | | { |
| | | return ($this->conn) ? $this->conn->result : null; |
| | | return $this->conn->result; |
| | | } |
| | | |
| | | |
| | |
| | | $imap_shared = $config->get('imap_ns_shared'); |
| | | $imap_delimiter = $config->get('imap_delimiter'); |
| | | |
| | | if (!$this->conn) |
| | | if (!$this->conn->connected()) |
| | | return; |
| | | |
| | | $ns = $this->conn->getNamespace(); |
| | |
| | | return $result; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * This is our own debug handler for the IMAP connection |
| | | * @access public |
| | | */ |
| | | public function debug_handler(&$imap, $message) |
| | | { |
| | | write_log('imap', $message); |
| | | } |
| | | |
| | | } // end class rcube_imap |
| | | |
| | | |