Skip to content

Commit 3bb67d5

Browse files
author
Magnus Singer
authored
Filter for special characters that fail sending test mail (#41469)
1 parent 1162259 commit 3bb67d5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

administrator/components/com_config/src/Model/ApplicationModel.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1199,7 +1199,9 @@ public function sendTestMail()
11991199
$mailer = new MailTemplate('com_config.test_mail', $user->getParam('language', $app->get('language')), $mail);
12001200
$mailer->addTemplateData(
12011201
[
1202-
'sitename' => $app->get('sitename'),
1202+
// Replace the occurrences of "@" and "|" in the site name in order to send the test mail, as these
1203+
// characters produce an error else wise: https://github.com/joomla/joomla-cms/issues/41061
1204+
'sitename' => preg_filter(['/@/', '/\|/'], '', $app->get('sitename'), -1),
12031205
'method' => Text::_('COM_CONFIG_SENDMAIL_METHOD_' . strtoupper($mail->Mailer)),
12041206
]
12051207
);

0 commit comments

Comments
 (0)