function SymfonyMailer::__construct

Same name in other branches
  1. 11.x core/lib/Drupal/Core/Mail/Plugin/Mail/SymfonyMailer.php \Drupal\Core\Mail\Plugin\Mail\SymfonyMailer::__construct()

Symfony mailer constructor.

Parameters

\Psr\Log\LoggerInterface $logger: The logger service.

\Symfony\Component\Mailer\MailerInterface $mailer: The mailer service. Only specify an instance in unit tests, pass NULL in production.

File

core/lib/Drupal/Core/Mail/Plugin/Mail/SymfonyMailer.php, line 94

Class

SymfonyMailer
Defines an experimental mail backend, based on the Symfony mailer component.

Namespace

Drupal\Core\Mail\Plugin\Mail

Code

public function __construct(LoggerInterface $logger, ?MailerInterface $mailer = NULL) {
}

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