1 mail.test public MailTestCase::format(array $message)

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

Overrides MailSystemInterface::format

See also

DefaultMailSystem

File

core/modules/simpletest/tests/mail.test, line 59
Test the Backdrop mailing system.

Class

MailTestCase
@file Test the Backdrop mailing system.

Code

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'] = backdrop_html_to_text($message['body']);
  // Wrap the mail body for sending.
  $message['body'] = backdrop_wrap_mail($message['body']);
  return $message;
}