function PhpMail::__construct

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Mail/Plugin/Mail/PhpMail.php \Drupal\Core\Mail\Plugin\Mail\PhpMail::__construct()
  2. 8.9.x core/lib/Drupal/Core/Mail/Plugin/Mail/PhpMail.php \Drupal\Core\Mail\Plugin\Mail\PhpMail::__construct()
  3. 10 core/lib/Drupal/Core/Mail/Plugin/Mail/PhpMail.php \Drupal\Core\Mail\Plugin\Mail\PhpMail::__construct()

PhpMail constructor.

File

core/lib/Drupal/Core/Mail/Plugin/Mail/PhpMail.php, line 49

Class

PhpMail
Defines the default Drupal mail backend, using PHP&#039;s native <a href="http://php.net/mail" target="_blank" class="php-manual" title="bool mail(string $to, string $subject, string $message [, string $additional_headers = [] [, string $additional_params = &quot;&quot;]]) Send mail">mail</a>() function.

Namespace

Drupal\Core\Mail\Plugin\Mail

Code

public function __construct() {
    $this->configFactory = \Drupal::configFactory();
    $this->request = \Drupal::request();
}

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