summaryrefslogtreecommitdiff
path: root/Postman/Postman-Mail/PostmanZendMailEngine.php
diff options
context:
space:
mode:
authoryehuda <yehuda@myinbox.in>2019-05-16 12:12:33 +0300
committeryehuda <yehuda@myinbox.in>2019-05-16 12:12:33 +0300
commit09ad01149ef5981407149bc3c9502058482fb419 (patch)
tree3ac2513ad5cb08650b03f55d837cf6b1d578dd21 /Postman/Postman-Mail/PostmanZendMailEngine.php
parent9e2de08e9df8ce719fa04da2405d64f633d94b0e (diff)
downloadPost-SMTP-09ad01149ef5981407149bc3c9502058482fb419.zip
Fix default method
The default method was trying to use SMTP, I think it's wrong and i'm changing it to default Sendmail
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 ) );
}