‪TYPO3CMS  10.4
TYPO3\CMS\Form\Domain\Finishers\EmailFinisher Class Reference
Inheritance diagram for TYPO3\CMS\Form\Domain\Finishers\EmailFinisher:
TYPO3\CMS\Form\Domain\Finishers\AbstractFinisher TYPO3\CMS\Form\Domain\Finishers\FinisherInterface

Public Attributes

const FORMAT_PLAINTEXT = 'plaintext'
 
const FORMAT_HTML = 'html'
 

Protected Member Functions

 executeInternal ()
 
StandaloneView initializeStandaloneView (FormRuntime $formRuntime, string $format)
 
 initializeFluidEmail (FormRuntime $formRuntime)
 
array getRecipients (string $listOption, string $singleAddressOption, string $singleAddressNameOption=null)
 
bool isHtmlPartAdded ()
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Form\Domain\Finishers\AbstractFinisher
string array null parseOption (string $optionName)
 
array string translateFinisherOption ( $subject, FormRuntime $formRuntime, string $optionName, $optionValue, array $translationOptions)
 
mixed substituteRuntimeReferences ($needle, FormRuntime $formRuntime)
 
int string array resolveRuntimeReference (string $property, FormRuntime $formRuntime)
 
TypoScriptFrontendController getTypoScriptFrontendController ()
 

Protected Attributes

array $defaultOptions
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Form\Domain\Finishers\AbstractFinisher
TYPO3 CMS Extbase Object ObjectManagerInterface $objectManager
 
string $finisherIdentifier = ''
 
string $shortFinisherIdentifier = ''
 
array $options = array( )
 
array $defaultOptions = array( )
 
TYPO3 CMS Form Domain Finishers FinisherContext $finisherContext
 

Additional Inherited Members

- ‪Public Member Functions inherited from ‪TYPO3\CMS\Form\Domain\Finishers\AbstractFinisher
 injectObjectManager (ObjectManagerInterface $objectManager)
 
 __construct (string $finisherIdentifier='')
 
string getFinisherIdentifier ()
 
 setOptions (array $options)
 
 setOption (string $optionName, $optionValue)
 
string null execute (FinisherContext $finisherContext)
 
bool isEnabled ()
 

Detailed Description

This finisher sends an email to one recipient

Options:

  • ‪templatePathAndFilename (mandatory for Mail): Template path and filename for the mail body
  • ‪templateName (mandatory for FluidEmail): Template name for the mail body
  • ‪templateRootPaths: root paths for the templates
  • ‪layoutRootPaths: root paths for the layouts
  • ‪partialRootPaths: root paths for the partials
  • ‪variables: associative array of variables which are available inside the Fluid template

The following options control the mail sending. In all of them, placeholders in the form of {...} are replaced with the corresponding form value; i.e. {email} as senderAddress makes the recipient address configurable.

  • ‪subject (mandatory): Subject of the email
  • ‪recipients (mandatory): Email addresses and human-readable names of the recipients
  • ‪senderAddress (mandatory): Email address of the sender
  • ‪senderName: Human-readable name of the sender
  • ‪replyToRecipients: Email addresses and human-readable names of the reply-to recipients
  • ‪carbonCopyRecipients: Email addresses and human-readable names of the copy recipients
  • ‪blindCarbonCopyRecipients: Email addresses and human-readable names of the blind copy recipients
  • ‪format: Format of the email (one of the FORMAT_* constants). By default mails are sent as HTML.

Scope: frontend

Definition at line 63 of file EmailFinisher.php.

Member Function Documentation

◆ executeInternal()

◆ getRecipients()

array TYPO3\CMS\Form\Domain\Finishers\EmailFinisher::getRecipients ( string  $listOption,
string  $singleAddressOption,
string  $singleAddressNameOption = null 
)
protected

Get mail recipients

Parameters
string$listOption‪List option name
string$singleAddressOption‪Single address option
string | null$singleAddressNameOption‪Single address name
Returns
‪array
Deprecated:
‪since TYPO3 v10.0, will be removed in TYPO3 v11.0.

Definition at line 334 of file EmailFinisher.php.

References TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger(), and TYPO3\CMS\Form\Domain\Finishers\AbstractFinisher\parseOption().

Referenced by TYPO3\CMS\Form\Domain\Finishers\EmailFinisher\executeInternal().

◆ initializeFluidEmail()

TYPO3\CMS\Form\Domain\Finishers\EmailFinisher::initializeFluidEmail ( FormRuntime  $formRuntime)
protected

Definition at line 259 of file EmailFinisher.php.

References $GLOBALS.

◆ initializeStandaloneView()

StandaloneView TYPO3\CMS\Form\Domain\Finishers\EmailFinisher::initializeStandaloneView ( FormRuntime  $formRuntime,
string  $format 
)
protected
Parameters
FormRuntime$formRuntime
string$format
Returns
‪StandaloneView
Exceptions
FinisherException

Definition at line 210 of file EmailFinisher.php.

Referenced by TYPO3\CMS\Form\Domain\Finishers\EmailFinisher\executeInternal().

◆ isHtmlPartAdded()

bool TYPO3\CMS\Form\Domain\Finishers\EmailFinisher::isHtmlPartAdded ( )
protected

Get plaintext preference

Returns
‪bool
Deprecated:
‪since TYPO3 v10.0, will be removed in TYPO3 v11.0.

Definition at line 386 of file EmailFinisher.php.

References TYPO3\CMS\Form\Domain\Finishers\AbstractFinisher\parseOption().

Referenced by TYPO3\CMS\Form\Domain\Finishers\EmailFinisher\executeInternal().

Member Data Documentation

◆ $defaultOptions

array TYPO3\CMS\Form\Domain\Finishers\EmailFinisher::$defaultOptions
protected
Initial value:
= array(
'recipientName' => '',
'senderName' => '',
'addHtmlPart' => true,
'attachUploads' => true,
)

Definition at line 70 of file EmailFinisher.php.

◆ FORMAT_HTML

const TYPO3\CMS\Form\Domain\Finishers\EmailFinisher::FORMAT_HTML = 'html'

Definition at line 66 of file EmailFinisher.php.

◆ FORMAT_PLAINTEXT

const TYPO3\CMS\Form\Domain\Finishers\EmailFinisher::FORMAT_PLAINTEXT = 'plaintext'