Beispiel #1
0
 /**
  * @access private
  * @param string $string
  * @return bool
  */
 function _putline($string)
 {
     CAdminPanel::Log('POP3 > ' . ap_Utils::ShowCRLF($string));
     $line = $string . "\r\n";
     if (!@fwrite($this->socket, $line, strlen($line))) {
         $this->error = 'POP3 _putline() - Error while send "' . $string . '". -- Connection closed.';
         $this->setGlobalErrorAndWriteLog();
         $this->_cleanup();
         return false;
     }
     return true;
 }
Beispiel #2
0
 function get_line()
 {
     $return = false;
     if ($this->connection) {
         $return = @fgets($this->connection, 512);
         if ($this->_bLogEnable) {
             $this->_log('IMAP4 < ' . ap_Utils::ShowCRLF($return));
         }
         if (!$return) {
             $_socket_status = @socket_get_status($this->connection);
             if (isset($_socket_status['timed_out']) && $_socket_status['timed_out']) {
                 $this->error = 'Error : Socket timeout reached during IMAP4 connection.';
             }
         }
     }
     return $return;
 }