ezcMailImapTransport::noop PHP Method

noop() public method

Before calling this method, a connection to the IMAP server must be established.
public noop ( )
    public function noop()
    {
        if ($this->state != self::STATE_NOT_AUTHENTICATED && $this->state != self::STATE_AUTHENTICATED && $this->state != self::STATE_SELECTED && $this->state != self::STATE_SELECTED_READONLY) {
            throw new ezcMailTransportException("Can not issue NOOP command if not connected.");
        }
        $tag = $this->getNextTag();
        $this->connection->sendData("{$tag} NOOP");
        $response = trim($this->getResponse($tag));
        if ($this->responseType($response) != self::RESPONSE_OK) {
            throw new ezcMailTransportException("NOOP failed: {$response}.");
        }
    }

Usage Example

コード例 #1
0
 public function testNoopNotConnected()
 {
     $imap = new ezcMailImapTransport(self::$server, self::$port);
     $imap->disconnect();
     try {
         $imap->noop();
         $this->fail("Expected exception was not thrown.");
     } catch (ezcMailTransportException $e) {
     }
 }
All Usage Examples Of ezcMailImapTransport::noop