public function MailTestCase::format

Concatenate and wrap the e-mail body for plain-text mails.

Overrides MailSystemInterface::format

See also

DefaultMailSystem

Archivo

drupal-7.x/modules/simpletest/tests/mail.test, line 67
Test the Drupal mailing system.

Class

MailTestCase
@file Test the Drupal mailing system.

Código

public function format(array $message) {
  // Join the body array into one string.
  $message['body'] = implode("\n\n", $message['body']);
  // Convert any HTML to plain-text.
  $message['body'] = drupal_html_to_text($message['body']);
  // Wrap the mail body for sending.
  $message['body'] = drupal_wrap_mail($message['body']);
  return $message;
}