public function QueueMailTestMailCollector::mail in Queue Mail 8
Sends an email message.
Parameters
array $message: A message array, as described in hook_mail_alter().
Return value
bool TRUE if the mail was successfully accepted, otherwise FALSE.
Overrides TestMailCollector::mail
See also
http://php.net/manual/function.mail.php
\Drupal\Core\Mail\MailManagerInterface::mail()
File
- tests/
modules/ queue_mail_test/ src/ Plugin/ Mail/ QueueMailTestMailCollector.php, line 31
Class
- QueueMailTestMailCollector
- QueueMailTestMailCollector class.
Namespace
Drupal\queue_mail_test\Plugin\MailCode
public function mail(array $message) {
$result = parent::mail($message);
if ($message['key'] == 'fail_message') {
$result = FALSE;
}
return $result;
}