diff options
author | Stefan Giehl <stefan@matomo.org> | 2021-01-05 04:08:03 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-05 04:08:03 +0300 |
commit | 185e41fe7717d0018cec7deb073d0cfc5de8334f (patch) | |
tree | f35262d5df187cf2fca1718732c7e06706be97e7 /core | |
parent | 27241f171961cfc8198d6356e5e579c3bf547aa5 (diff) |
Make it possible to configure smtp to use no encryption (#17039)
Diffstat (limited to 'core')
-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'])) { |