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

Hi,

wondering if there is a way to have either

  • a custom sender depending on applications
    e.g. agenda events sending mails coming from agenda@example.com
    POS events (deal made/invoice paid) sending mails from invoice@example.com

  • or disable globally (not per user) the email notification for one module

I think that the actions listed in the “email notification module settings/List of automatic fixed notifications” come in a php file? and can be change in such a file?

regards,
James

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

thank you but unfortunately my knowledge in the dolibarr / php language is not that good.

And I just realized that anyway the paid invoice gets notified by mail not because it is an invoice but because the invoice has been “attached” to the calendar as a creation and as such was notified by the calendar.

so I am screwed