AccordGroup / MandrillSwiftMailerBundle

A Symfony bundle that provides a Swiftmailer transport service for Mandrill
GNU General Public License v2.0
20 stars 15 forks source link

Fix service name #6

Closed gonzalovilaseca closed 9 years ago

gonzalovilaseca commented 9 years ago

I couldn't make this bundle work out of the box as swiftmailer bundle forces the name of the transport:

 foreach ($mailers as $name => $mailer) {
    $plugins = $container->findTaggedServiceIds(sprintf('swiftmailer.%s.plugin', $name));
    $transport = sprintf('swiftmailer.mailer.%s.transport', $name);
    $definition = $container->findDefinition($transport);
    foreach ($plugins as $id => $args) {
        $definition->addMethodCall('registerPlugin', array(new Reference($id)));
    }
}

so it was looking for a service named swiftmailer.mailer.transport.accord_mandrill. This PR solves the issue.