Unfortunately, there is very little documentation about email theming (especially for a newbie as myself)… The only thing is that section in the documentation: Email — Nextcloud latest Administration Manual latest documentation
For enterprise users, there seems to be a detailed description Customized email templates that is even linked in the documentation. That guide however isn’t accessible for non-paid users like me…
First of all, I have to edit the text of the welcome email…
I know that it was possible somehow in NC 17 but I forgot how respectively I cannot find the file anymore which I have to edit in NC 18…
does anyone know what I have to do?
In addition, it would be really great if there was some guide how to edit the design/theme of the mail…
ok… now I have found the file that contains the text of the welcome email! It’s /var/www/nextcloud/apps/settings/lib/Mailer/NewUserMailHelper.php.
However, it contains only the English text.
The translations seem to be in /var/www/nextcloud/apps/settings/l10n/. Changing all the necessary files is really annoying… Is there any way to change all at once???
And: Is there any possibility to make the changes persistent through updates??
I think you must only edit some variables if you do not want to break or change the design.
Perhaps only change the text addBodyText( ....
"Welcome to your %s account, you can add, protect, and share your data." : "Willkommen zu Deinem %s-Konto. Du kannst Deine Daten hinzufügen, schützen und teilen.",
all fields in the formated e-amail: $emailTemplate->setSubject($l10n->t('Your %s account was created', [$this->themingDefaults->getName()])); $emailTemplate->addHeading($l10n->t('Welcome aboard')); $emailTemplate->addHeading($l10n->t('Welcome aboard %s', [$displayName])); $emailTemplate->addBodyText($l10n->t('Welcome to your %s account, you can add, protect, and share your data.', [$this->themingDefaults->getName()])); $emailTemplate->addBodyText($l10n->t('Your username is: %s', [$userId])); $leftButtonText = $l10n->t('Set your password'); $leftButtonText = $l10n->t('Go to %s', [$this->themingDefaults->getName()]); $l10n->t('Install Client'),
Perhaps you can additional change the design. in the php-scripts.
First, I changed the English text of the welcome email by editing /var/www/nextcloud/apps/settings/lib/Mailer/NewUserMailHelper.php (Creating new paragraphs goes by copying $emailTemplate->addBodyText($l10n->t( )
Then I changed the .json translation files in /var/www/nextcloud/apps/settings/l10n/. The .js files seem to be ignored completely…
However, I still didn’t find any way to keep the changes after an update… Does anyone have an idea?