function TestPhpMailFailure::mail

Same name in other branches
  1. 9 core/modules/system/tests/modules/system_mail_failure_test/src/Plugin/Mail/TestPhpMailFailure.php \Drupal\system_mail_failure_test\Plugin\Mail\TestPhpMailFailure::mail()
  2. 8.9.x core/modules/system/tests/modules/system_mail_failure_test/src/Plugin/Mail/TestPhpMailFailure.php \Drupal\system_mail_failure_test\Plugin\Mail\TestPhpMailFailure::mail()
  3. 10 core/modules/system/tests/modules/system_mail_failure_test/src/Plugin/Mail/TestPhpMailFailure.php \Drupal\system_mail_failure_test\Plugin\Mail\TestPhpMailFailure::mail()

Overrides PhpMail::mail

File

core/modules/system/tests/modules/system_mail_failure_test/src/Plugin/Mail/TestPhpMailFailure.php, line 31

Class

TestPhpMailFailure
Defines a mail sending implementation that always fails.

Namespace

Drupal\system_mail_failure_test\Plugin\Mail

Code

public function mail(array $message) {
    // Simulate a failed mail send by returning FALSE.
    return FALSE;
}

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