interface TransportServiceFactoryInterface

An interface defining mailer transport service factory implementations.

The transport service factory is responsible to create a transport instance according to the site configuration. The default service factory looks up the `mailer_dsn` key from the `system.mail` config and returns an appropriate transport implementation.

Contrib and custom code may choose to replace or decorate the transport service factory in order to provide a mailer transport instance which requires more complex setup.

Hierarchy

Expanded class hierarchy of TransportServiceFactoryInterface

All classes that implement TransportServiceFactoryInterface

File

core/lib/Drupal/Core/Mailer/TransportServiceFactoryInterface.php, line 21

Namespace

Drupal\Core\Mailer
View source
interface TransportServiceFactoryInterface {
    
    /**
     * Creates and returns a configured mailer transport class.
     */
    public function createTransport() : TransportInterface;

}

Members

Title Sort descending Modifiers Object type Summary
TransportServiceFactoryInterface::createTransport public function Creates and returns a configured mailer transport class.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.