Bug #104461
Updated by Georg Ringer 4 months ago
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@. f:format.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: <pre><code class="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> </code></pre> Try to send a test mail TYPO3 backend by using the "Test Mail Setup".