Open corent1lb opened 1 month ago
Une solution ?
Le bug est toujours présent dans la version 20.0.2
You are writing "when you send an email to several Third Parties via the invoice list". In the default installation, I do not see the possibility to send invoices to each customer, but to send many invoices to destinations, using the group action "Send email".
One email will be send, containing all the invoices, for each email in the destination field. This does not send an email by invoice to each customer.
I mean when you check multiple invoices in invoices list, then you select "send an email" and it send email to the third party attached to the invoice checked. I described step by step how to reproduce the probleme :
"When you are in the list of invoices, you check several invoices and click on "select an action" and click on "send email", if the selected mail template contains the variable "ONLINE_PAYMENT_URL" then when you apply this mail template, this variable is absent (I dont mean present in the body and then the recipient does not receive the link) from the body of the mail."
The functionnality is not the same for me :
You say : "I mean when you check multiple invoices ... and it send email to the third party attached to the invoice checked."
On my installation, this does not send an email "to the third party attached to the invoice checked". This send an email to the destination addresses you choose, with all the invoices checked attached at once.
OK I think I am missing informations on my thirdparties, on a production instance, it seems to work as you describes... I look in more precisely.
This should be clearer with a screenshot :
Yes this is what I am doing but on my fresh install for testing, I had not the same behaviour, soi I tried on a production instance and I can see exactly what you said, so now I am working on it.
I fixed it, since version 16, when we do not click on "one email per recipient". https://github.com/Dolibarr/dolibarr/pull/31927 We shall wait the fix to be merged.
@corent1lb Can you tell me if the fix solves your problem ?
Nope, it don't solve the problem and the modification in html.formmail.class.php cause an error 500 when I want to modify an email template
On my fresh 20 I do not see an error... I have warnings (already there, not caused by the fix), but this is working. I tested modifying the template :
Can you send me a screen shot or at least more debugging information ?
Bug
Some substitution variables when used in an email template are not displayed in the body of the email (when writing) when you send an email to several Third Parties via the invoice list
Dolibarr Version
20.0.0
Environment PHP
8.2.22
Environment Database
MariaDB 11.4.3
Steps to reproduce the behavior and expected behavior
When you are in the list of invoices, you check several invoices and click on "select an action" and click on "send email", if the selected mail template contains the variable "ONLINE_PAYMENT_URL" then when you apply this mail template, this variable is absent (I dont mean present in the body and then the recipient does not receive the link) from the body of the mail.
I use other variables in my mail template and it works correctly for the others, only this one is problematic.
Attached files
My email template :
The email template when selected in invoices list :