system_mail

system_mail($key, &$message, $params)

Implements hook_mail().

File

core/modules/system/system.module, line 1307
Configuration system that lets administrators modify the workings of the site.

Code

function system_mail($key, &$message, $params) {
  $token_service = \Drupal::token();

  $context = $params['context'];

  $subject = PlainTextOutput::renderFromHtml($token_service->replace($context['subject'], $context));
  $body = $token_service->replace($context['message'], $context);

  $message['subject'] .= str_replace(array("\r", "\n"), '', $subject);
  $message['body'][] = $body;
}
doc_Drupal
2016-10-29 09:45:56
Comments
Leave a Comment

Please login to continue.