diff --git a/api/src/Mailer.php b/api/src/Mailer.php index 38c810bdab..66a9e352f4 100644 --- a/api/src/Mailer.php +++ b/api/src/Mailer.php @@ -1,6 +1,6 @@ getHeader('Message-ID')) && class_exists('Horde_Mime_Headers_MessageId')) // since 2.5.0 { @@ -524,7 +531,7 @@ class Mailer extends Horde_Mime_Mail try { // no flowed for encrypted messages - $flowed = $this->_body && $this->_body->getType() != 'multipart/encrypted'; + if (!isset($flowed)) $flowed = $this->_body && $this->_body->getType() != 'multipart/encrypted'; // check if flowed is disabled in mail site configuration if (($config = config::read('mail')) && $config['disable_rfc3676_flowed']) @@ -560,7 +567,7 @@ class Mailer extends Horde_Mime_Mail $this->_body = $body; $flowed = false; } - parent::send($this->account->smtpTransport(), true, $flowed); // true: keep Message-ID + parent::send($transport ? $transport : $this->account->smtpTransport(), true, $flowed); // true: keep Message-ID } catch (\Exception $e) { // in case of errors/exceptions call hook again with previous returned mail_id and error-message to log