From 96d0890de9e865c76df3bc2f47d1855fe1a445d9 Mon Sep 17 00:00:00 2001 From: Lei Nelissen Date: Wed, 1 Feb 2023 15:53:39 +0100 Subject: [PATCH] fix: allow SMTP TLS to be set for all ports This reverts PR #40943 This resolves #45899 --- src/Illuminate/Mail/MailManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Mail/MailManager.php b/src/Illuminate/Mail/MailManager.php index 2e2b23c94d9d..cb799305eeec 100644 --- a/src/Illuminate/Mail/MailManager.php +++ b/src/Illuminate/Mail/MailManager.php @@ -172,7 +172,7 @@ protected function createSmtpTransport(array $config) $factory = new EsmtpTransportFactory; $transport = $factory->create(new Dsn( - ! empty($config['encryption']) && $config['encryption'] === 'tls' ? (($config['port'] == 465) ? 'smtps' : 'smtp') : '', + ! empty($config['encryption']) && $config['encryption'] === 'tls' ? 'smtps' : '', $config['host'], $config['username'] ?? null, $config['password'] ?? null,