Skip to content

Commit 68a8bfc

Browse files
committed
allow scheme to be specified
1 parent c885dbf commit 68a8bfc

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/Illuminate/Mail/MailManager.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,16 @@ protected function createSmtpTransport(array $config)
171171
{
172172
$factory = new EsmtpTransportFactory;
173173

174-
$transport = $factory->create(new Dsn(
175-
! empty($config['encryption']) && $config['encryption'] === 'tls'
174+
$scheme = $config['scheme'] ?? null;
175+
176+
if (! $scheme) {
177+
$scheme = ! empty($config['encryption']) && $config['encryption'] === 'tls'
176178
? (($config['port'] == 465) ? 'smtps' : 'smtp')
177-
: '',
179+
: '';
180+
}
181+
182+
$transport = $factory->create(new Dsn(
183+
$scheme,
178184
$config['host'],
179185
$config['username'] ?? null,
180186
$config['password'] ?? null,

0 commit comments

Comments
 (0)