Example #1
0
 /**
  * Close IMAP connection.
  * Usually done on script shutdown
  */
 public function close()
 {
     $this->conn->closeConnection();
     if ($this->mcache) {
         $this->mcache->close();
     }
 }
Example #2
0
 /**
  * Close IMAP connection and re-connect
  * This is used to avoid some strange socket errors when talking to Courier IMAP
  *
  * @access public
  */
 function reconnect()
 {
     $this->conn->closeConnection();
     $connected = $this->connect($this->host, $this->user, $this->pass, $this->port, $this->ssl);
     // issue SELECT command to restore connection status
     if ($connected && strlen($this->mailbox)) {
         $this->conn->select($this->mailbox);
     }
 }