Skip to content

Commit 435c05b

Browse files
committed
formatting
1 parent 7ed1dad commit 435c05b

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

src/Illuminate/Mail/TransportManager.php

+18-16
Original file line numberDiff line numberDiff line change
@@ -47,26 +47,28 @@ protected function createSmtpDriver()
4747
$transport->setPassword($config['password']);
4848
}
4949

50-
// Next we will set any stream context options specified for the transport
51-
// and then return it. The option is not required any may not be inside
52-
// the configuration array at all so we'll verify that before adding.
50+
return $this->configureSmtpDriver($transport, $config);
51+
}
52+
53+
/**
54+
* Configure the additional SMTP driver options.
55+
*
56+
* @param \Swift_SmtpTransport $transport
57+
* @param array $config
58+
* @return \Swift_SmtpTransport
59+
*/
60+
protected function configureSmtpDriver($transport, $config)
61+
{
5362
if (isset($config['stream'])) {
5463
$transport->setStreamOptions($config['stream']);
5564
}
56-
57-
// Set the source ip for servers which have more than one ip address.
58-
// This will cause Swift SMTP transport to make requests only via that
59-
// IP address, which is useful for firewalled smtp servers like gmail
60-
// smtp relay.
61-
if (isset($config['sourceip'])) {
62-
$transport->setSourceIp($config['sourceip']);
65+
66+
if (isset($config['source_ip'])) {
67+
$transport->setSourceIp($config['source_ip']);
6368
}
64-
65-
// Allow setting the local domain which Swift SMTP transport will use
66-
// to identify the request domain to the smtp server, which is useful
67-
// for shared smtp servers like gmail's smtp relay.
68-
if (isset($config['localdomain'])) {
69-
$transport->setLocalDomain($config['localdomain']);
69+
70+
if (isset($config['local_domain'])) {
71+
$transport->setLocalDomain($config['local_domain']);
7072
}
7173

7274
return $transport;

0 commit comments

Comments
 (0)