Mailer implements MailerInterface

Adapter for Symfony/Mailer to be used by TYPO3 extensions.

This will use the setting in TYPO3_CONF_VARS to choose the correct transport for it to work out-of-the-box.

Table of Contents

Interfaces

MailerInterface

Properties

$eventDispatcher  : EventDispatcherInterface
$mailerHeader  : string
$mailSettings  : array<string|int, mixed>
$sentMessage  : SentMessage|null
$transport  : TransportInterface

Methods

__construct()  : mixed
When constructing, also initializes the Symfony Transport like configured
getRealTransport()  : TransportInterface
Returns the real transport (not a spool).
getSentMessage()  : SentMessage|null
getTransport()  : TransportInterface
injectMailSettings()  : mixed
This method is only used in unit tests
send()  : void
getTransportFactory()  : TransportFactory

Properties

$eventDispatcher

protected EventDispatcherInterface $eventDispatcher

$mailerHeader

protected string $mailerHeader = 'TYPO3'

This will be added as X-Mailer to all outgoing mails

$mailSettings

protected array<string|int, mixed> $mailSettings = []

$sentMessage

protected SentMessage|null $sentMessage

$transport

protected TransportInterface $transport

Methods

__construct()

When constructing, also initializes the Symfony Transport like configured

public __construct([TransportInterface|null $transport = null ][, EventDispatcherInterface|null $eventDispatcher = null ]) : mixed
Parameters
$transport : TransportInterface|null = null

optionally pass a transport to the constructor.

$eventDispatcher : EventDispatcherInterface|null = null
Tags
throws
Exception

getRealTransport()

Returns the real transport (not a spool).

public getRealTransport() : TransportInterface
Return values
TransportInterface

getSentMessage()

public getSentMessage() : SentMessage|null
Return values
SentMessage|null

getTransport()

public getTransport() : TransportInterface
Return values
TransportInterface

injectMailSettings()

This method is only used in unit tests

public injectMailSettings([array<string|int, mixed>|null $mailSettings = null ]) : mixed
Parameters
$mailSettings : array<string|int, mixed>|null = null
Internal

send()

public send(RawMessage $message[, Envelope|null $envelope = null ]) : void
Parameters
$message : RawMessage
$envelope : Envelope|null = null
Tags
inheritdoc

        
On this page

Search results