wondering if there is a way to have either
a custom sender depending on applications
e.g. agenda events sending mails coming from email@example.com
POS events (deal made/invoice paid) sending mails from firstname.lastname@example.org
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?
I want to suggest hooks for creating custom emails, whether it is the sender, recipients, subject line, or email body, etc.
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.
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