# How to programmatically send or disable notifications emails?

**URL:** <https://meta.discourse.org/t/how-to-programmatically-send-or-disable-notifications-emails/291258>\
**Category:** Development\
**Tags:** email\
**Created:** [January 11, 2024, 4:31am UTC](https://meta.discourse.org/t/how-to-programmatically-send-or-disable-notifications-emails/291258 "2024-01-11T04:31:32Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![omppatil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/omppatil/32/359876_2.png) [@omppatil](https://meta.discourse.org/u/omppatil)\
**Post date:** [January 11, 2024, 4:31am UTC](https://meta.discourse.org/t/how-to-programmatically-send-or-disable-notifications-emails/291258/1 "2024-01-11T04:31:32Z")

</div>

Hi!,  
How can we programmatically send or disable notification emails for users subscribed to categories like ‘watching,’ ‘tracking,’ ‘watching first post,’ ‘normal,’ and ‘muted’ when they publish a topic or post that requires approval before being published? Specifically, I am seeking **guidance on the program functions used by plugins during the creation of a topic or post, when it is in the review queue awaiting approval, and after approval, to notify users by email based on their subscription preferences. How can we determine which users should receive emails and which should not?** I would appreciate some help. Thank you!

---

_[View the full topic](https://meta.discourse.org/t/how-to-programmatically-send-or-disable-notifications-emails/291258)._
