-
Notifications
You must be signed in to change notification settings - Fork 8
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
Support NC12 #23
Comments
Well the main issue is, that the emails are now themed with the new email template system. What exactly do you want to change? |
The goal is to be able to do the same as this app does. In our case we currently have defined the email content in email.new_user.php and email.new_user_plain_text.php. Is there a way to do this same as comfortably in the new email template system? A pointer where to find more info would be great, thanks. But then, how come the app will be supported for NC13? 😄 |
Yeah so what do you want to change? the text of the email? the layout? add additional info? If you want to change stuff for all emails, you can overwrite the EmailTemplate in the config with 12.0.1 and later: https://github.com/nextcloud/server/blob/8760abae636b1c6f3f37e78300b318adb98d0220/config/config.sample.php#L969-L974 |
Text as well as layout.
Thanks for the pointer. However it doesn't look like the same, as the text of individual doesn't seem to be editable? And not as convenient as this app where things can be achieved by just quickly modifying some HTML. It would be really awesome if this app could support NC12, after all support for NC13 is in the cards. It's really sad that with the NC12 upgrade, features like the ones offered by this app are not available anymore 😿 Seems others have also reported this problem: https://help.nextcloud.com/t/email-templates-missing-nc-12/14356 |
Please update the manual if there is no Theming posibility in the admin page (https://docs.nextcloud.com/server/12/developer_manual/core/theming.html) |
@nickvergessen |
Ping |
@TheMrApostel you can do this via translation layer. But it is a terrible approach! @nickvergessen as mentioned above please update the manual!!! @nickvergessen I looked closer at the source code of |
Well the idea is that you create your own EmailTemplate class and then replace it the config.php. Then you can change the HTML as you prefer. For the next version we will add identifiers, so you can also only modify some emails. And feel free to update the documentation with any changes you need |
So, in other words, there is no way to change an email template from web console? |
Exactly, it's not there anymore, because if you break the php syntax by missing out a semicolon or something similar, you break sending the email completly. |
Can someone please point me where i can change the code of OC\Mail\EMailTemplate::class? |
@TheMrApostel it isn't good idea change code in Better way is create your own class like this example:
<?php namespace MyVendor;
use OC\Mail\EMailTemplate;
class MyClass extends EMailTemplate
{
// there you can do what will you do
}
'mail_template_class' => MyVendor\MyClass::class |
I find this hard to understand. Where do I save such a PHP file then? Somewhere in my /themes/MyTheme/core folder? |
The clean way would be to have a dedicated app for it. @MariusBluem status of the post I gave you? |
The clean way would be to have a dedicated app for it.
That might be at the moment, but as NextCloud supports theming directly (hence the admin menu) I think this should be part of that menu.
Creating an app has a really really steep learning curve (from my own experience with ownCloud, which app containers are the same). A decent UI on the admin page would benefit most admins far better. Not every admin (personal or professional) is a developer. Most are just maintainers.
I really think that this should be part of the core functions... just as ownCloud.
|
I find this also hard to understand. I had no problems by creating an webserver and install nextcloud with ldap and so on but i do not unterstand how to create my own extension. Can i copy and paste the code from NC11 there? I also think that this should be a part of the core functions. |
@nickvergessen I'm now a bit confused as this issue is now closed but pointing to another thread #5180 however that thread is now pointing as well back to this one. The circle is round but still no fix? Or a future enhancement? Or do we get 2 more lines in the admin page that can be included in the invite e-mail for new users? Please advise as this is confusing. thanks! |
Well see the comment from |
Uhm, right. I’ll consider the template editor unsupported on NC12. Even my theme logo isn’t in the mail :( Anyway, thanks for your time. |
@msberends are you sure that you have see here |
Ah, thanks!!! I’ll convert my logo.svg right away.
|
@nickvergessen
|
@TheMrApostel no, that's not right.
Example
<?php namespace MyVendor;
use OC\Mail\EMailTemplate;
class MyClass extends EMailTemplate
{
protected $header = <<<EOF
<table align="center" class="wrapper">
// your theme email header modification
</table>
EOF;
}
|
@marley-ma Thank you for your kind help! |
It looks like exactly that isn't possible, at least for individual emails? That's why this app (templateeditor) would still be needed but it doesn't support NC12. |
well... i'm afraid there WAS such an app. and as much as i can understand why you removed it from the appstore i am wondering why you don't just update it since it seems soooooooooo easy, as you implied in another posting from above. well to cut a long story short: a thing like "editing email-templates" is needed. and it should be an app itself (since modifying source code with every update isn't the best thing to do - as you put out earlier, yourself). |
This is possible with the new way as well. In 12.0.3 we added identifiers so text can be added to individual emails only. As explain already multiple times, we won't fix this app or build a new one, because it's to complicated to make sure stuff still works correctly when we change an email. E.g. when we add a new feature to an email or remove one. |
Nick, maybe I missed it from the release notes for 1203 but where is it documented how to change some e-mails? thnx again, Jeroen |
I was able to build a dedicated app and override the EMailTemplate class as described above. Thanks for pointing me in the right direction @nickvergessen . I'll also add my voice to the chorus and say that I would like to see better support for custom email templates in the core application. |
That’s great Jared! Please share it using the App Store :)
|
is there any update on this? |
See nextcloud/server#8350 (comment) for more details. |
Here is a good explanation how to create your own template: https://help.nextcloud.com/t/solved-custimze-emails/23931/3
|
And what Nextcloud-snap users should do? |
Hi,
Please release the mail template editor for NC 12, it's desperately needed, thanks!
The text was updated successfully, but these errors were encountered: