summaryrefslogtreecommitdiff
path: root/Postman/Postman-Mail/PostmanZendMailEngine.php
diff options
context:
space:
mode:
Diffstat (limited to 'Postman/Postman-Mail/PostmanZendMailEngine.php')
-rw-r--r--Postman/Postman-Mail/PostmanZendMailEngine.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/Postman/Postman-Mail/PostmanZendMailEngine.php b/Postman/Postman-Mail/PostmanZendMailEngine.php
index e4ea286..86905f8 100644
--- a/Postman/Postman-Mail/PostmanZendMailEngine.php
+++ b/Postman/Postman-Mail/PostmanZendMailEngine.php
@@ -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 ) );
}