Issue Task Accepted Stale

#102335TransportFactory should instantiate custom transports via DI container

Alexander Schnitzler 11/07/23, 10:04 updated 08/06/26, 16:02

Description

Currently, when using $GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport'] = '<classname>'; and/or $GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport_spool_type'] = '<classname>';, the class in question is instantiated via makeInstance() along with constructor arguments, which does not allow to use a configured service here which itself allows for DI. this also blocks extending AbstractTransport which does a lot of useful logic already you don’t want to reimplement.

The core should use a signaling interface here like MailSettingsAware which passes the mail settings to the service (if needed) instead of passing those along as constructor arguments, especially since those are available through $GLOBALS anyway…

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

Fix this issue

Start the commit message of your patch with this. Add what the patch does, and the versions it goes to in "Releases:". How to create a patch

Commit message
[TASK] TransportFactory should instantiate custom transports via DI container Resolves: #102335 Releases: main