We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c885dbf commit 68a8bfcCopy full SHA for 68a8bfc
src/Illuminate/Mail/MailManager.php
@@ -171,10 +171,16 @@ protected function createSmtpTransport(array $config)
171
{
172
$factory = new EsmtpTransportFactory;
173
174
- $transport = $factory->create(new Dsn(
175
- ! empty($config['encryption']) && $config['encryption'] === 'tls'
+ $scheme = $config['scheme'] ?? null;
+
176
+ if (! $scheme) {
177
+ $scheme = ! empty($config['encryption']) && $config['encryption'] === 'tls'
178
? (($config['port'] == 465) ? 'smtps' : 'smtp')
- : '',
179
+ : '';
180
+ }
181
182
+ $transport = $factory->create(new Dsn(
183
+ $scheme,
184
$config['host'],
185
$config['username'] ?? null,
186
$config['password'] ?? null,
0 commit comments