diff options
Diffstat (limited to 'core/Mail/Transport.php')
-rw-r--r-- | core/Mail/Transport.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/core/Mail/Transport.php b/core/Mail/Transport.php index 7ac2fbf2e4..edf6b13755 100644 --- a/core/Mail/Transport.php +++ b/core/Mail/Transport.php @@ -107,7 +107,7 @@ class Transport /** * @return void */ - private function initSmtpTransport($phpMailer) + private function initSmtpTransport(PHPMailer $phpMailer) { $mailConfig = Config::getInstance()->mail; @@ -133,7 +133,11 @@ class Transport } if (!empty($mailConfig['encryption'])) { - $phpMailer->SMTPSecure = $mailConfig['encryption']; + if (strtolower($mailConfig['encryption']) === 'none') { + $phpMailer->SMTPAutoTLS = false; // force using no encryption + } else { + $phpMailer->SMTPSecure = $mailConfig['encryption']; + } } if (!empty($mailConfig['port'])) { |