The Mailer class used by EnvironmentController::mailTestAction()
requires the EventDispatcher to be available. Provide it by
configuring EventDispatcher and ListenerProvider in a ServiceProvider,
which enables usage from the failsafe install-tool container.
Note: Event listeners that are registered using symfony tags
will still be added to the ServiceProvider instantiated ListenerProvider
in non-failsafe mode. The symfony generated factory will look like:
$this->services['TYPO3\\CMS\\Core\\EventDispatcher\\ListenerProvider'] =
$instance =
\TYPO3\CMS\Core\ServiceProvider::getListenerProvider($this);
$instance
->addListener(
'TYPO3\\CMS\\Core\\Mail\\Event\\AfterMailerInitializationEvent',
'TYPO3\\CMS\\Core\\Compatibility\\Slot\\PostInitializeMailer',
NULL
);