---
title: "Feature: #90266 - Fluid-based email templating"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:feature-90266"
source: "Changelog/10.3/Feature-90266-Fluid-basedTemplatedEmails.rst"
typo3-version: "10.3"
typo3-major: 10
type: "feature"
issue: 90266
forge: "https://forge.typo3.org/issues/90266"
tags: ["Fluid", "ext:core"]
rendered: "2026-09-23T16:35:56+00:00"
---

# Feature: #90266 - Fluid-based email templating {#feature-90266}

See [forge#90266](https://forge.typo3.org/issues/90266)

## Description {#description}

TYPO3 now supports sending template-based emails for multi-part and HTML-based
emails out-of-the-box. The email contents are built with Fluid Templating Engine.

TYPO3's backend functionality already ships with a default layout
for templated emails, which can be tested out in TYPO3's install tool test email functionality.

It is also possible to set a default mode for sending out emails via `$GLOBALS['TYPO3_CONF_VARS']['MAIL']['format']`
which can be `both`, `plain` or `html`.

This option can however overridden by Extension authors in their use cases.

All Fluid-based template paths can be configured via

`LocalConfiguration.php`:

-   `$GLOBALS['TYPO3_CONF_VARS']['MAIL']['layoutRootPaths']`
-   `$GLOBALS['TYPO3_CONF_VARS']['MAIL']['partialRootPaths']`
-   `$GLOBALS['TYPO3_CONF_VARS']['MAIL']['templateRootPaths']`

where TYPO3 reserves all array keys below `100` for internal purposes. If you want to provide custom templates or layouts,
set this in your `LocalConfiguration.php` / `AdditionalConfiguration.php` file:

-   `$GLOBALS['TYPO3_CONF_VARS']['MAIL']['templateRootPaths'][700] = 'EXT:my_site_extension/Resources/Private/Templates/Email';`
-   `$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 template,
which - if set - takes precedence over the `subject()` method.

## Impact {#impact}

TYPO3 now sends out templated messages for system emails in both plaintext and HTML format.

It is possible to use the same API in your custom extension like this:

```php
$email = GeneralUtility::makeInstance(FluidEmail::class);
$email
    ->to('contact@acme.com')
    ->from(new Address('jeremy@acme.com', 'Jeremy'))
    ->subject('TYPO3 loves you - here is why')
    ->format('html') // only HTML mail
    ->setTemplate('TipsAndTricks')
    ->assign('mySecretIngredient', 'Tomato and TypoScript');
GeneralUtility::makeInstance(Mailer::class)->send($email);
```

Defining a custom email subject in a custom template:

```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:

```php
$email = GeneralUtility::makeInstance(FluidEmail::class);
$email
    ->to('contact@acme.com')
    ->assign('language', 'de');
```

```html
<f:translate languageKey="{language}" id="LLL:my_ext/Resources/Private/Language/emails.xml:subject" />
```
