/**
  *
  * @param unknown $hostname        	
  * @param unknown $port        	
  * @param unknown $success        	
  */
 private function buildResponse($hostname, $port, PostmanPortTest $portTest, $success, $transport = '')
 {
     $this->logger->debug(sprintf('testing port result for %s:%s success=%s', $hostname, $port, $success));
     $response = array('hostname' => $hostname, 'hostname_domain_only' => $portTest->hostnameDomainOnly, 'port' => $port, 'protocol' => $portTest->protocol, 'secure' => $portTest->secure, 'mitm' => $portTest->mitm, 'reported_hostname' => $portTest->reportedHostname, 'reported_hostname_domain_only' => $portTest->reportedHostnameDomainOnly, 'message' => $portTest->getErrorMessage(), 'start_tls' => $portTest->startTls, 'auth_plain' => $portTest->authPlain, 'auth_login' => $portTest->authLogin, 'auth_crammd5' => $portTest->authCrammd5, 'auth_xoauth' => $portTest->authXoauth, 'auth_none' => $portTest->authNone, 'try_smtps' => $portTest->trySmtps, 'success' => $success, 'transport' => $transport);
     $this->logger->trace('Ajax response:');
     $this->logger->trace($response);
     if ($success) {
         wp_send_json_success($response);
     } else {
         wp_send_json_error($response);
     }
 }