Subject: [PATCH] Fixed XF 2.3.0 Release Candidate 3 XF-220652 - Do not force SSL connections when using STARTTLS for SMTP
---
Index: src/XF/Mail/Mailer.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/XF/Mail/Mailer.php b/src/XF/Mail/Mailer.php
--- a/src/XF/Mail/Mailer.php (revision ddc8063dcb669172d80f174602806baabaea28db)
+++ b/src/XF/Mail/Mailer.php (revision f528d6d31ba7b312c605f572b82edffeb526bf60)
@@ -343,15 +343,14 @@
{
switch ($type)
{
- case 'smtp';
+ case 'smtp':
$factory = new EsmtpTransportFactory();
return $factory->create(new Dsn(
- !empty($config['smtpEncrypt']) && $config['smtpEncrypt'] != 'none' ? 'smtps' : '',
+ empty($config['smtpEncrypt']) || $config['smtpEncrypt'] !== 'ssl' ? 'smtp' : 'smtps',
$config['smtpHost'],
$config['smtpLoginUsername'] ?? null,
$config['smtpLoginPassword'] ?? null,
- $config['smtpPort'] ?? null,
- $config
+ $config['smtpPort'] ?? null
));
case 'file':