diff --git a/typo3/sysext/core/Documentation/Changelog/master/Feature-90266-Fluid-basedTemplatedEmails.rst b/typo3/sysext/core/Documentation/Changelog/master/Feature-90266-Fluid-basedTemplatedEmails.rst index 7dea169e5f277158d5905e24ccf369f5da7e56fb..10fb163b9b9cc3e3f5a8de30e2c9185bc102df1c 100644 --- a/typo3/sysext/core/Documentation/Changelog/master/Feature-90266-Fluid-basedTemplatedEmails.rst +++ b/typo3/sysext/core/Documentation/Changelog/master/Feature-90266-Fluid-basedTemplatedEmails.rst @@ -32,6 +32,9 @@ set this in your LocalConfiguration.php / AdditionalConfiguration.php file: * :php:`$GLOBALS['TYPO3_CONF_VARS']['MAIL']['layoutRootPaths'][700] = 'EXT:my_site_extension/Resources/Private/Layouts';` +In addition, it is possible to define a section within the Fluid email, +which - if set - takes precedence over the :php:`subject()` method. + Impact ====== @@ -51,4 +54,24 @@ It is possible to use the same API in your custom extension like this: ->assign('mySecretIngredient', 'Tomato and TypoScript'); GeneralUtility::makeInstance(Mailer::class)->send($email); +Defining a custom email subject in a custom template: + +.. code-block:: html + + <f:section name="Subject">New Login at "{typo3.sitename}"</f:section> + +Building templated emails with Fluid also allows to define the language key, +and use this within the Fluid template: + +.. code-block:: php + + $email = GeneralUtility::makeInstance(FluidEmail::class); + $email + ->to('contact@acme.com') + ->assign('language', 'de'); + +.. code-block:: html + + <f:translate languageKey="{language}" id="LLL:my_ext/Resources/Private/Language/emails.xml:subject" /> + .. index:: Fluid, ext:core