# 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:** 2

<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 16, 2024, 8:07am UTC](https://meta.discourse.org/t/how-to-programmatically-send-or-disable-notifications-emails/291258/2 "2024-01-16T08:07:27Z")

</div>

I am currently working on implementing a feature in our forum that involves programmatically sending or disabling notification emails for users subscribed to specific categories. The categories include ‘watching,’ ‘tracking,’ ‘watching first post,’ ‘normal,’ and ‘muted,’ particularly when users publish a topic or post that requires approval before being published.

I am seeking guidance on the program functions utilized by plugins at various stages of the process, specifically during the creation of a topic or post, while it is in the review queue awaiting approval, and after approval. My goal is to notify users by email based on their subscription preferences.

Could you please provide insights or direct me to relevant resources that explain how to determine which users should receive emails and which should not during this process?

Any help or suggestions would be greatly appreciated. Thank you in advance for your assistance!

---

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