Issue Bug Closed

#104461"Test Mail Setup" cannot send mails if System HTML mail layout uses <f:translate>

Natalie Kleine-Herzbruch 07/23/24, 12:52 updated 11/10/26, 14:00

Description

In TYPO3 12.4.17, it’s not possible to send a mail in the “Test Mail Setup” (backend module Admin tools/Environment) if the mail HTML layout uses the Fluid ViewHelper f:translate. The following error occurs:

Could not deliver mail
Please verify $GLOBALS[‘TYPO3_CONF_VARS’][‘MAIL’][*] settings are valid. Error message: Could not resolve application type to either frontend or backend.

Without the usage of the Fluid HTML ViewHelper or with the default mail layout, the test mail is sent correctly.

In EXT:forms the mail is sent correctly in FE. Also workspace mails are sent correctly.

Steps to reproduce the error:

In the config/system7addionional.php, add an additional template root path:
$GLOBALS[‘TYPO3_CONF_VARS’][‘MAIL’][‘layoutRootPaths’]700 = ‘EXT:example/Resources/Private/Layouts/’;

Create a HTML template file EXT:example/Resources/Private/Layouts/SystemEmail.html:

<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:core="http://typo3.org/ns/TYPO3/CMS/Core/ViewHelpers" data-namespace-typo3-fluid="true" >
<head>

</head>
<body>

                            <p style="margin-top: 0;">

                                    <f:translate key="LLL:EXT:fiblorg_theme/Resources/Private/Language/locallang.xlf:mails.footer" />

                            </p>

</body>
</html>

Try to send a test mail TYPO3 backend by using the “Test Mail Setup”.

Reviews 2

History 717

  1. Georg Ringer commented <span data-processor="relativetime" data-value="2024-07-23T14:43:39+00:00" > 07/23/24, 14:43 </span>

    can be reproduced by adding e.g. {f:translate(key:'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:and')} somewhere to typo3/sysext/core/Resources/Private/Layouts/SystemEmail.html

  2. Benni Mack commented and changed status Under Review Closed <span data-processor="relativetime" data-value="2026-11-10T14:00:53+00:00" > 11/10/26, 14:00 </span>

    This is resolved on main and 14.3: install tool requests now resolve to the application type “install” (#108486), so using <f:translate><br>in a custom SystemEmail layout no longer breaks “Test Mail Setup”.</f:translate>

    Offering a plain vs. templated test mail in the install tool would be a separate feature.