Email finisher 

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

Table of contents

Working with 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, 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 refers to the problem of using the -t parameter as well. Since TYPO3 7.5 (#65791) 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 

Changed in version 12.0

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

A finisher configuration could look like this:

public/fileadmin/forms/my_form_with_email_finisher.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
Copied!

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