---
title: "Email finisher"
manual: "Form"
version: "13.4"
permalink: "https://docs.typo3.org/permalink/typo3/cms-form:concepts-finishers-emailfinisher@13.4"
source: "I/Concepts/Finishers/ReadyToUseFinishers/EmailFinisher/Index.rst"
rendered: "2026-10-03T08:24:23+00:00"
---

# Email finisher {#concepts-finishers-emailfinisher}

The EmailFinisher sends an email to one recipient. EXT:form uses two
EmailFinisher declarations with the identifiers EmailToReceiver and EmailToSender.

**Table of contents**

-   [Email finisher usage in the backend form](https://docs.typo3.org/permalink/typo3/cms-form:email-finisher-usage-in-the-backend-form@13.4)
-   [Options of the email finisher](https://docs.typo3.org/permalink/typo3/cms-form:options-of-the-email-finisher@13.4)
-   [Additional options of the email finisher](https://docs.typo3.org/permalink/typo3/cms-form:additional-options-of-the-email-finisher@13.4)
-   [Email finisher in the YAML form definition](https://docs.typo3.org/permalink/typo3/cms-form:email-finisher-in-the-yaml-form-definition@13.4)
-   [Usage of the Email finisher in PHP code](https://docs.typo3.org/permalink/typo3/cms-form:usage-of-the-email-finisher-in-php-code@13.4)
-   [Working with BCC recipients](https://docs.typo3.org/permalink/typo3/cms-form:working-with-bcc-recipients@13.4)
-   [About FluidEmail](https://docs.typo3.org/permalink/typo3/cms-form:about-fluidemail@13.4)

> [!IMPORTANT]
> Finishers are executed in the order defined in your form definition.
>
> See [Finisher execution order](https://docs.typo3.org/permalink/typo3/cms-form:concepts-finishers-execution-order@13.4).

## Email finisher usage in the backend form {#finishers-email-to-receiver}

The backend form offers two email finishers to the editor:

-   **Email to sender (form submitter)**

    This finisher sends an email to the form submitter - i.e. the user - with the
    contents of the form.

-   **Email to receiver (you)**

    This finisher sends an email to the receiver - you as the owner of the
    website - with the contents of the form. The settings of the finisher are the
    same as for the finisher "Email to sender"

## Options of the email finisher {#apireference-finisheroptions-emailfinisher-options}

-   **Subject \[subject\]**

    -   *Type:* string
    -   *Required:* true

    Subject of the email.

-   **Recipients \[recipients\]**

    -   *Type:* array
    -   *Required:* true

    Email addresses and names of the recipients (To).

    -   ****Email Address****

        Email address of a recipient, e.g. "[some.recipient@example.com](mailto:some.recipient@example.com)"
        or "{email-1}".

    -   ****Name****

        Name of a recipient, e.g. "Some Recipient" or "{text-1}".

-   **Sender address \[senderAddress\]**

    -   *Type:* string
    -   *Required:* true

    Email address of the sender, for example "[your.company@example.org](mailto:your.company@example.org)".

    If [smtp](https://docs.typo3.org/m/typo3/reference-coreapi/13.4/en-us/ApiOverview/Mail/Index.html#mail-configuration-smtp)
    is used to send the email it should always be an email address allowed by the
    SMTP server. Use `replyToRecipients` if you want to enable the receiver to
    easily reply to the message.

-   **Sender name \[senderName\]**

    -   *Type:* string
    -   *Default:* `''`

    Name of the sender, for example "Your Company".

-   **Reply-to Recipients \[replyToRecipients\]**

    -   *Type:* array
    -   *Default:* `[]`

    Email address which will be used when someone replies to the email.

    -   ****Email Address**:**

        Email address for reply-to.

    -   ****Name****

        Name for reply-to.

-   **CC Recipient \[carbonCopyRecipients\]**

    -   *Type:* array
    -   *Default:* `[]`

    Email address to which a copy of the email is sent. The information is
    visible to all other recipients.

    -   ****Email Address**:**

        Email address for CC.

    -   ****Name****

        Name for CC.

-   **BCC Recipients \[blindCarbonCopyRecipients\]**

    -   *Type:* array
    -   *Default:* `[]`

    Email address to which a copy of the email is sent. The information is not
    visible to any of the recipients.

    -   ****Email Address**:**

        Email address for BCC.

    -   ****Name****

        Name for BCC.

-   **Add HTML part \[addHtmlPart\]**

    -   *Type:* bool
    -   *Default:* `true`

    If set, mails will contain a plaintext and HTML part, otherwise only a
    plaintext part. That way, it can be used to disable HTML and enforce
    plaintext-only mails.

-   **Attach uploads \[attachUploads\]**

    -   *Type:* bool
    -   *Default:* `true`

    If set, all uploaded items are attached to the email.

-   **Title \[title\]**

    -   *Type:* string
    -   *Default:* `undefined`

    The title, being shown in the email.

-   **Translation language \[translation.language\]**

    -   *Type:* string
    -   *Default:* `undefined`

    If not set, the finisher options are translated depending on the current
    frontend language (if translations exist). This option allows you to force
    translations for a given language isocode, e.g. `da` or `de`.
    Read [Translate finisher options](https://docs.typo3.org/permalink/typo3/cms-form:concepts-frontendrendering-translation-finishers@13.4).

## Additional options of the email finisher {#apireference-finisheroptions-emailfinisher-options-options}

These additional options can be set directly in the form definition YAML or
programmatically in the options array but **not** from the backend editor:

-   **Properties excluded from translation \[translation.propertiesExcludedFromTranslation\]**

    -   *Type:* array
    -   *Default:* `undefined`

    If not set, the finisher options are translated depending on the current frontend language (if translations exists).
    This option allows you to force translations for a given language isocode, e.g 'da' or 'de'.
    Read [Translate finisher options](https://docs.typo3.org/permalink/typo3/cms-form:concepts-frontendrendering-translation-finishers@13.4) for more informations.l be skipped for all specified finisher options.

-   **translation.translationFiles**

    -   *Type:* array
    -   *Default:* `undefined`

    If set, this translation file(s) will be used for finisher option
    translations. If not set, the translation file(s) from the `Form` element
    will be used.
    Read [Translate finisher options](https://docs.typo3.org/permalink/typo3/cms-form:concepts-frontendrendering-translation-finishers@13.4).

-   **layoutRootPaths**

    -   *Type:* array
    -   *Default:* `undefined`

    Fluid layout paths.

-   **partialRootPaths**

    -   *Type:* array
    -   *Default:* `undefined`

    Fluid partial paths.

-   **templateRootPaths**

    -   *Type:* array
    -   *Default:* `undefined`

    Fluid template paths; all templates get the current `FormRuntime`
    assigned as `form` and the `FinisherVariableProvider` assigned
    as `finisherVariableProvider`.

-   **variables**

    -   *Type:* array
    -   *Default:* `undefined`

    Associative array of variables which are available inside the Fluid template.

## Email finisher in the YAML form definition {#concepts-finishers-emailfinisher-yaml}

This finisher sends an email to one recipient.
EXT:form uses 2 EmailFinisher declarations with the identifiers
`EmailToReceiver` and `EmailToSender`.

**public/fileadmin/forms/my_form.yaml**

```yaml
identifier: example-form
label: 'example'
type: Form

finishers:
  -
    identifier: EmailToReceiver
    options:
      subject: 'Your message'
      recipients:
        your.company@example.com: 'Your Company name'
        ceo@example.com: 'CEO'
      senderAddress: 'form@example.com'
      senderName: 'form submitter'

```

## Usage of the Email finisher in PHP code {#apireference-finisheroptions-emailfinisher}

Developers can create a confirmation finisher by using the key `EmailToReceiver`
or `EmailToSender`.

```php
<?php

use TYPO3\CMS\Form\Domain\Model\FormDefinition;

class SomeClass
{
    private function addEmailToReceiverFinisher(FormDefinition $formDefinition)
    {
        $formDefinition->createFinisher('EmailToReceiver', [
            'subject' => 'Your message',
            'recipients' => [
                'your.company@example.com' => 'Your Company name',
                'ceo@example.com' => 'CEO'
            ],
            'senderAddress' => $GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromAddress'],
            'senderName' => $GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromName'],
        ]);
    }
}

```

This finisher is implemented in `\TYPO3\CMS\Form\Domain\Finishers\EmailFinisher`.

## Working with BCC recipients {#concepts-finishers-emailfinisher-bcc-recipients}

Both email finishers support different recipient types, including Carbon Copy
(CC) and Blind Carbon Copy (BCC). Depending on the configuration of the server
and the TYPO3 instance, it may not be possible to send emails to BCC recipients.
The configuration of the `$GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport_sendmail_command']`
value is crucial. As documented in [CORE API](https://docs.typo3.org/m/typo3/reference-coreapi/13.4/en-us/ApiOverview/Mail/Index.html#mail-configuration-sendmail),
TYPO3 recommends the parameter `-bs` (instead of `-t -i`) when using
`sendmail`. The parameter `-bs` tells TYPO3 to use the SMTP standard
and that way the BCC recipients are properly set. [Symfony](https://symfony.com/doc/current/mailer.html#using-built-in-transports)
refers to the problem of using the `-t` parameter as well. Since TYPO3 7.5
([#65791](https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/7.5/Feature-65791-UsePHPConfiguredSendmailPathIfMAILtransportSendmailIsActive.html))
the `transport_sendmail_command` is automatically set from the PHP runtime
configuration and saved. Thus, if you have problems with sending emails to BCC
recipients, check the above mentioned configuration.

## About FluidEmail {#concepts-finishers-emailfinisher-fluidemail}

<!-- TODO: no Markdown rendering for "versionchanged" -->

The EmailFinisher always sends email via FluidEmail.

FluidEmail allows to send mails in a standardized way.

The option `title` is available which can
be used to add an email title to the default FluidEmail template. This option is
capable of rendering form element variables using the known bracket syntax and can
be overwritten in the FlexForm configuration of the form plugin.

To customize the templates being used following options can be set:

-   `templateName`: The template name (for both HTML and plaintext) without the
    extension
-   `templateRootPaths`: The paths to the templates
-   `partialRootPaths`: The paths to the partials
-   `layoutRootPaths`: The paths to the layouts

> [!NOTE]
> The formerly available field `templatePathAndFilename` is not evaluated
> anymore.

A finisher configuration could look like this:

**public/fileadmin/forms/my_form_with_email_finisher.yaml**

```yaml
identifier: contact
type: Form
prototypeName: standard
finishers:
  -
    identifier: EmailToSender
    options:
      subject: 'Your Message: {message}'
      title: 'Hello {name}, your confirmation'
      templateName: ContactForm
      templateRootPaths:
        100: 'EXT:my_site_package/Resources/Private/Templates/Email/'
      partialRootPaths:
        100: 'EXT:my_site_package/Resources/Private/Partials/Email/'
      addHtmlPart: true

```

In the example above the following files must exist in the specified
template path:

-   `EXT:my_site_package/Resources/Private/Templates/Email/ContactForm.html`
-   `EXT:my_site_package/Resources/Private/Templates/Email/ContactForm.txt`
