Project

General

Profile

Actions

Bug #104461

open

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

Added by Natalie Kleine-Herzbruch 4 months ago. Updated about 1 month ago.

Status:
Under Review
Priority:
Should have
Assignee:
-
Category:
Fluid
Target version:
-
Start date:
2024-07-23
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

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".


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Feature #90266: Fluid-based templated emailsClosedBenni Mack2020-01-31

Actions
Related to TYPO3 Core - Bug #104809: Exception in BE login notification with f:translate in custom SystemEmail layoutClosedMathias Brodala2024-09-04

Actions
Actions

Also available in: Atom PDF