Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorStefan Giehl <stefan@matomo.org>2021-01-05 04:08:03 +0300
committerGitHub <noreply@github.com>2021-01-05 04:08:03 +0300
commit185e41fe7717d0018cec7deb073d0cfc5de8334f (patch)
treef35262d5df187cf2fca1718732c7e06706be97e7 /core
parent27241f171961cfc8198d6356e5e579c3bf547aa5 (diff)
Make it possible to configure smtp to use no encryption (#17039)
Diffstat (limited to 'core')
-rw-r--r--core/Mail/Transport.php8
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'])) {