[Swiftmailer] fixed the determination of the default port
This commit is contained in:
parent
0dfd5960f1
commit
7a614cb1ea
@ -45,7 +45,7 @@ class Configuration
|
||||
->scalarNode('username')->defaultNull()->end()
|
||||
->scalarNode('password')->defaultNull()->end()
|
||||
->scalarNode('host')->defaultValue('localhost')->end()
|
||||
->scalarNode('port')->defaultValue(25)->end()
|
||||
->scalarNode('port')->defaultValue(false)->end()
|
||||
->scalarNode('encryption')
|
||||
->defaultNull()
|
||||
->validate()
|
||||
|
@ -71,8 +71,8 @@ class SwiftmailerExtension extends Extension
|
||||
|
||||
$container->setAlias('swiftmailer.transport', 'swiftmailer.transport.'.$transport);
|
||||
|
||||
if ('ssl' === $config['encryption'] && !isset($config['port'])) {
|
||||
$config['port'] = 465;
|
||||
if (false === $config['port']) {
|
||||
$config['port'] = 'ssl' === $config['encryption'] ? 465 : 25;
|
||||
}
|
||||
|
||||
foreach (array('encryption', 'port', 'host', 'username', 'password', 'auth_mode') as $key) {
|
||||
|
Reference in New Issue
Block a user