Mautic Community Forums

Swiftmailer.default.plugin not fired in custom plugin

Hello, I’m developing a custom plugin and I want to make some action before an email is send.

If I set muy plugin as here it works ok, but I have to change EmailBundle/Helper/MailHelper.php, something that I don’t want.

I want to register the swiftmailer plugin on my plugin config, as shown here: so in my plugin conf y have:

   'services' => [
            'swiftmailer.default.plugin.quota' => [
                'class' => 'MauticPlugin\CampaingExtensionBundle\EventListener\Swift_Plugins_Quota',
                'arguments' => [],
                'tags' => [

But in this case is never fired. Any help?