[Bug]: Custom email templates don't work in custom app. #45392
Labels
0. Needs triage
Pending check for reproducibility or if it fits our roadmap
28-feedback
bug
feature: emails
pending documentation
This pull request needs an associated documentation update
Bug description
According to the docs, we can override the email template by extending the Class
OC\Mail\EMailTemplate
https://docs.nextcloud.com/server/29/admin_manual/configuration_server/email_configuration.html#using-email-templates (Edited link to current version)
config/additional.config.php
:This does not work if the extending class is put into the namespace of my custom app (as suggested in the doc).
Maybe there is some problem with loading the
OCA\\MyApp
namespace, I'm not sure. There were no error messages in the logs.If I create the class in the same namespace, it works fine:
config/additional.config.php
:lib/private/Mail/EMailTemplateModified.php
See this thread in the forums: https://help.nextcloud.com/t/change-style-for-emails/165481/8?u=matengor
Steps to reproduce
Result:
Expected behavior
The received mail should contain my modifications
Installation method
Official All-in-One appliance
Nextcloud Server version
28
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.2
Web server
None
Database engine version
None
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info
The text was updated successfully, but these errors were encountered: