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:
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'])) {