Skip to content

Commit

Permalink
[Swiftmailer] changed disable_strategy behavior
Browse files Browse the repository at this point in the history
The blackhole plugin that was used previously stop the propagation
of events, which means that the behavior can be slightly different
depending on the order of plugin registrations.

Instead, we now use the null transport to avoid this issue.
  • Loading branch information
fabpot committed Jun 15, 2011
1 parent 5b142d5 commit 52697ed
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -60,6 +60,10 @@ public function load(array $configs, ContainerBuilder $container)
$transport = $config['transport'];
}

if (isset($config['disable_delivery']) && $config['disable_delivery']) {
$transport = 'null';
}

if ('smtp' === $transport) {
$loader->load('smtp.xml');
}
Expand Down Expand Up @@ -117,10 +121,6 @@ public function load(array $configs, ContainerBuilder $container)
} else {
$container->setParameter('swiftmailer.single_address', null);
}

if (isset($config['disable_delivery']) && $config['disable_delivery']) {
$container->getDefinition('swiftmailer.plugin.blackhole')->addTag('swiftmailer.plugin');
}
}

/**
Expand Down

0 comments on commit 52697ed

Please sign in to comment.