diff --git a/administrator/components/com_config/src/Model/ApplicationModel.php b/administrator/components/com_config/src/Model/ApplicationModel.php index ae8704d7e7d94..4bbc4a03d848e 100644 --- a/administrator/components/com_config/src/Model/ApplicationModel.php +++ b/administrator/components/com_config/src/Model/ApplicationModel.php @@ -1199,7 +1199,9 @@ public function sendTestMail() $mailer = new MailTemplate('com_config.test_mail', $user->getParam('language', $app->get('language')), $mail); $mailer->addTemplateData( [ - 'sitename' => $app->get('sitename'), + // Replace the occurrences of "@" and "|" in the site name in order to send the test mail, as these + // characters produce an error else wise: https://github.com/joomla/joomla-cms/issues/41061 + 'sitename' => preg_filter(['/@/', '/\|/'], '', $app->get('sitename'), -1), 'method' => Text::_('COM_CONFIG_SENDMAIL_METHOD_' . strtoupper($mail->Mailer)), ] );