diff options
Diffstat (limited to 'Postman/Postman-Mail/PostmanZendMailEngine.php')
-rw-r--r-- | Postman/Postman-Mail/PostmanZendMailEngine.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Postman/Postman-Mail/PostmanZendMailEngine.php b/Postman/Postman-Mail/PostmanZendMailEngine.php index 8d69811..86905f8 100644 --- a/Postman/Postman-Mail/PostmanZendMailEngine.php +++ b/Postman/Postman-Mail/PostmanZendMailEngine.php @@ -47,8 +47,8 @@ if ( ! class_exists( 'PostmanZendMailEngine' ) ) { /** * - * @param unknown $senderEmail - * @param unknown $accessToken + * @param mixed $senderEmail + * @param mixed $accessToken */ function __construct( PostmanZendModuleTransport $transport ) { assert( isset( $transport ) ); @@ -171,10 +171,12 @@ if ( ! class_exists( 'PostmanZendMailEngine' ) ) { $this->logger->debug( 'Create the Zend_Mail transport' ); $zendTransport = $this->transport->createZendMailTransport( $this->transport->getHostname(), array() ); + $transport = $this->transport instanceof PostmanDefaultModuleTransport ? null : $zendTransport; + try { // send the message $this->logger->debug( 'Sending mail' ); - $mail->send( $zendTransport ); + $mail->send( $transport ); if ( $this->logger->isInfo() ) { $this->logger->info( sprintf( 'Message %d accepted for delivery', PostmanState::getInstance()->getSuccessfulDeliveries() + 1 ) ); } @@ -204,7 +206,7 @@ if ( ! class_exists( 'PostmanZendMailEngine' ) ) { $message = $e->getMessage(); if ( $e->getCode() == 334 ) { // replace the unusable Google message with a better one in the case of code 334 - $message = sprintf( __( 'Communication Error [334] - make sure the Envelope From email is the same account used to create the Client ID.', Postman::TEXT_DOMAIN ) ); + $message = sprintf( __( 'Communication Error [334] - make sure the Envelope From email is the same account used to create the Client ID.', 'post-smtp' ) ); } // create a new exception $newException = new Exception( $message, $e->getCode() ); |