Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX 16.0 - Notifications: configured e-mail templates not used if recipient is fixed e-mail address #29407

Conversation

atm-florianm
Copy link
Contributor

Issue description

When you configure the notification module, e-mail notifications can be sent:

  1. either to Users/Contacts (each user / contact can subscribe to specific notification types in the relevant tab of their User / Contact cards)

  2. or to fixed e-mail addresses, configured directly in the admin page of the notification module

The admin page enables you to choose e-mail templates to use for specific notification types. When chosen, an e-mail template overrides the default message (based on translation keys).

The problem is that this override works for Users / Contacts (1) but not for fixed e-mail addresses (2), which always use a default message using hard-coded translation keys.

This PR

This fix is mostly a copy/paste of what is done for Users/Contacts into the portion of code that sends notifications to fixed e-mail addresses. So this adds duplicated code and thus could benefit from some refactoring in later Dolibarr versions.

… are not used if the recipient is a fixed e-mail address
@eldy eldy merged commit 54caae5 into Dolibarr:16.0 Apr 20, 2024
2 checks passed
@atm-florianm atm-florianm deleted the FIX_16.0_notification_module_sends_hard_coded_message_instead_of_email_template branch April 24, 2024 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants