/** * Diagnostic Data test to current SMTP server * * @return string */ private function testConnectivity(PostmanModuleTransport $transport) { $hostname = $transport->getHostname($this->options); $port = $transport->getPort($this->options); if (!empty($hostname) && !empty($port)) { $portTest = new PostmanPortTest($transport->getHostname($this->options), $transport->getPort($this->options)); $result = $portTest->genericConnectionTest($this->options->getConnectionTimeout()); if ($result) { return 'Yes'; } else { return 'No'; } } return 'n/a'; }
/** * Clean up after sending the mail * * @param PostmanZendMailEngine $engine * @param unknown $startTime */ private function postSend(PostmanMailEngine $engine, $startTime, PostmanOptions $options, PostmanModuleTransport $transport) { // save the transcript $this->transcript = $engine->getTranscript(); // log the transcript if ($this->logger->isTrace()) { $this->logger->trace('Transcript:'); $this->logger->trace($this->transcript); } // delete the semaphore if ($transport->isLockingRequired()) { PostmanUtils::unlock(); } // stop the clock $endTime = microtime(true) * 1000; $this->totalTime = $endTime - $startTime; }
/** * * @param PostmanModuleTransport $transport */ public function validate(PostmanModuleTransport $transport) { if ($transport->isEmailValidationSupported()) { $this->internalValidate(); } }
/** * A short-hand way of showing the complete delivery method * * @param PostmanModuleTransport $transport * @return string */ public function getPublicTransportUri(PostmanModuleTransport $transport) { return $transport->getPublicTransportUri(); }