Skip to content

Commit

Permalink
adjust MailManager to detect if smtp or smtps is needed by checking e…
Browse files Browse the repository at this point in the history
…ncryption (laravel#53749)
  • Loading branch information
danielrona authored and browner12 committed Dec 10, 2024
1 parent 3785325 commit 6454721
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Illuminate/Mail/MailManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,9 @@ protected function createSmtpTransport(array $config)
$scheme = $config['scheme'] ?? null;

if (! $scheme) {
$scheme = ($config['port'] == 465) ? 'smtps' : 'smtp';
$scheme = ! empty($config['encryption']) && $config['encryption'] === 'tls'
? 'smtps'
: 'smtp';
}

$transport = $factory->create(new Dsn(
Expand Down

0 comments on commit 6454721

Please # to comment.