/**
  * A short-hand way of showing the complete delivery method
  *
  * @param PostmanTransport $transport        	
  * @return string
  */
 public function getPublicTransportUri(PostmanTransport $transport)
 {
     $options = PostmanOptions::getInstance();
     $transportName = $transport->getSlug();
     $auth = $transport->getAuthenticationType($options);
     $security = $transport->getSecurityType($options);
     $host = $transport->getHostname($options);
     $port = $transport->getHostPort($options);
     return sprintf('%s:%s:%s://%s:%s', $transportName, $security, $auth, $host, $port);
 }
 public function createConfig(PostmanTransport $transport)
 {
     // retrieve the hostname and port form the transport
     $hostname = $transport->getHostname();
     $port = $transport->getHostPort();
     // the sender email is needed for the OAuth2 Bearer token
     $senderEmail = PostmanOptions::getInstance()->getEnvelopeSender();
     assert(!empty($senderEmail));
     // the vendor is required for Yahoo's OAuth2 implementation
     $vendor = $this->createVendorString($hostname);
     // create the OAuth2 SMTP Authentication string
     $initClientRequestEncoded = $this->createAuthenticationString($senderEmail, PostmanOAuthToken::getInstance()->getAccessToken(), $vendor);
     // create the Configuration structure for Zend_Mail
     $config = $this->createConfiguration($hostname, $port, $transport->getSecurityType(), $transport->getAuthenticationType(), $initClientRequestEncoded);
     // return the Configuration structure
     return $config;
 }