public function createConfig(PostmanTransport $transport) { // retrieve the hostname and port form the transport $hostname = $transport->getHostname(); $port = $transport->getHostPort(); $securityType = $transport->getSecurityType(); $authType = $transport->getAuthenticationType(); $username = $transport->getCredentialsId(); $password = $transport->getCredentialsSecret(); // create the Configuration structure for Zend_Mail $config = array('port' => $port); $this->logger->debug(sprintf('Using %s:%s ', $hostname, $port)); if ($securityType != PostmanOptions::ENCRYPTION_TYPE_NONE) { $config['ssl'] = $securityType; $this->logger->debug('Using encryption ' . $securityType); } else { $this->logger->debug('Using no encryption'); } if ($authType != PostmanOptions::AUTHENTICATION_TYPE_NONE) { $config['auth'] = $authType; $config['username'] = $username; $config['password'] = $password; $this->logger->debug(sprintf('Using auth %s with username %s and password %s ', $authType, $username, PostmanUtils::obfuscatePassword($password))); } else { $this->logger->debug('Using no authentication'); } // return the Configuration structure return $config; }