diff --git a/apps/settings/tests/Mailer/NewUserMailHelperTest.php b/apps/settings/tests/Mailer/NewUserMailHelperTest.php index e4c5cb20973..0fe1d922275 100644 --- a/apps/settings/tests/Mailer/NewUserMailHelperTest.php +++ b/apps/settings/tests/Mailer/NewUserMailHelperTest.php @@ -349,7 +349,7 @@ class NewUserMailHelperTest extends TestCase { -

TestCloud -
This is an automatically sent email, please do not reply.

+

TestCloud
This is an automatically sent email, please do not reply.

@@ -376,7 +376,7 @@ Install Client: https://nextcloud.com/install/#install-clients -- -TestCloud - +TestCloud This is an automatically sent email, please do not reply. EOF; @@ -581,7 +581,7 @@ EOF; -

TestCloud -
This is an automatically sent email, please do not reply.

+

TestCloud
This is an automatically sent email, please do not reply.

@@ -608,7 +608,7 @@ Install Client: https://nextcloud.com/install/#install-clients -- -TestCloud - +TestCloud This is an automatically sent email, please do not reply. EOF; @@ -802,7 +802,7 @@ EOF; -

TestCloud -
This is an automatically sent email, please do not reply.

+

TestCloud
This is an automatically sent email, please do not reply.

@@ -827,7 +827,7 @@ Install Client: https://nextcloud.com/install/#install-clients -- -TestCloud - +TestCloud This is an automatically sent email, please do not reply. EOF; diff --git a/lib/private/Mail/EMailTemplate.php b/lib/private/Mail/EMailTemplate.php index b04fa903ba8..efe1a6eef1d 100644 --- a/lib/private/Mail/EMailTemplate.php +++ b/lib/private/Mail/EMailTemplate.php @@ -619,7 +619,11 @@ EOF; public function addFooter(string $text = '', ?string $lang = null) { if ($text === '') { $l10n = $this->l10nFactory->get('lib', $lang); - $text = $this->themingDefaults->getName() . ' - ' . $this->themingDefaults->getSlogan($lang) . '
' . $l10n->t('This is an automatically sent email, please do not reply.'); + $slogan = $this->themingDefaults->getSlogan($lang); + if ($slogan !== '') { + $slogan = ' - ' . $slogan; + } + $text = $this->themingDefaults->getName() . $slogan . '
' . $l10n->t('This is an automatically sent email, please do not reply.'); } if ($this->footerAdded) {