# Add middleware before sending any email

**URL:** <https://forum.mautic.org/t/add-middleware-before-sending-any-email/22871>\
**Category:** Development\
**Tags:** integrations-plugins\
**Created:** [March 1, 2022, 7:53pm UTC](https://forum.mautic.org/t/add-middleware-before-sending-any-email/22871 "2022-03-01T19:53:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mjch](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mjch/32/6968_2.png) [@mjch](https://forum.mautic.org/u/mjch)\
**Post date:** [March 1, 2022, 7:53pm UTC](https://forum.mautic.org/t/add-middleware-before-sending-any-email/22871/1 "2022-03-01T19:53:43Z")

</div>

Hello everyone,  
is mautic has the ability to write a middleware before sending any email?

I need to check something before sending email, if everything are ok, mautic can send email, otherwise it’s need to be rejected.

I reviewd the documentation and I think I can do it with [EXTENDING CAMPAIGNS](https://developer.mautic.org/#extending-campaigns) but I’m not sure

thanks
