# Swiftmailer.default.plugin not fired in custom plugin

**URL:** <https://forum.mautic.org/t/swiftmailer-default-plugin-not-fired-in-custom-plugin/16745>\
**Category:** Development\
**Created:** [October 26, 2020, 11:40am UTC](https://forum.mautic.org/t/swiftmailer-default-plugin-not-fired-in-custom-plugin/16745 "2020-10-26T11:40:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ahiniesta](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ahiniesta/32/1032_2.png) [@ahiniesta](https://forum.mautic.org/u/ahiniesta)\
**Post date:** [October 26, 2020, 11:40am UTC](https://forum.mautic.org/t/swiftmailer-default-plugin-not-fired-in-custom-plugin/16745/1 "2020-10-26T11:40:00Z")

</div>

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 [https://swiftmailer.symfony.com/docs/plugins.html](https://swiftmailer.symfony.com/docs/plugins.html) 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: [https://symfony.com/doc/3.4/reference/dic\_tags.html#swiftmailer-default-plugin](https://symfony.com/doc/3.4/reference/dic_tags.html#swiftmailer-default-plugin) so in my plugin conf y have:

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

```

But in this case is never fired. Any help?
