I’ve been working on a trigger for our installation of Dolibarr and I am now (almost) done. The last step is to send a confirmation email when the trigger occurs, but I find no way to do this in the API. Basically, I want an email to be sent to myself when trigger is due.
How do you send an email from the PHP-code that uses the mail-settings from within Dolibarr?
I can’t seem to see which version you are talking about? I use v18.
So here’s what I just did once, so it might not work.
-
Click home in the top left.
-
Click setup below in the left side
-
click emails below in the left side.
-
not in the top menu line, but the 2. menu line I select “Email templates”
-
click + in the right side to add a new template.
-
I return to the top left “Home”.
-
Click Setup
-
Click “Modules/Applications”
-
search for “trigger” or “notification”.
-
Click the cogwheel correlating to “Notifications on business event”
-
Hopefully the one you need are listed somewhere under “Templates for notifications” - mine was (Customer proposal validated)
-
Scroll further down to “List of automatic fixed notifications”
-
Correlating to “Commercial proposal” I wrote my email address, and I got an email when I validated a proposal.
Hope this helps
1 Like
This was even easier than the way we were trying to do. Thanks.