Exemple #1
0
 /**
  * @param QuarkClient $client
  * @param int         $expect
  * @param string      $cmd
  *
  * @throws QuarkArchException
  */
 private function _cmd(QuarkClient $client, $expect, $cmd = '')
 {
     if (func_num_args() == 3) {
         $client->Send($cmd . "\r\n");
     }
     $response = $client->Receive(QuarkClient::MODE_BUCKET);
     $code = substr($response, 0, 3);
     $this->_log .= $cmd . ': ' . $response . '<br>';
     if ($code != $expect) {
         throw new QuarkArchException('SMTP server returned unexpected [' . $code . '] for command ' . $cmd);
     }
 }