Sending email notification only for some modules or with a customized sender per module

I want to suggest hooks for creating custom emails, whether it is the sender, recipients, subject line, or email body, etc.

Dolibarr Hooks

Consider the CMailFile hook function called ‘sendMail’.
$reshook = $hookmanager->executeHooks('sendMail', $parameters, $this, $action);

Then you can likely set triggers to when a specific module’s event fires.
Dolibarr Triggers

I did some hook work with customizing my emails which you may find code that is useful in: Custom Module for Sending Emails in Development Servers