You are here

public function SimplenewsHTMLTestingMailSystem::format in Simplenews 7.2

Same name and namespace in other branches
  1. 7 includes/simplenews.mail.inc \SimplenewsHTMLTestingMailSystem::format()

Implements MailSystemInterface::format().

Overrides MailSystemInterface::format

File

includes/simplenews.mail.inc, line 929
Simplenews email send and spool handling

Class

SimplenewsHTMLTestingMailSystem
A mail sending implementation that captures sent messages to a variable.

Code

public function format(array $message) {

  // Join the body array into one string.
  $message['body'] = implode("\n\n", $message['body']);

  // Wrap the mail body for sending.
  $message['body'] = drupal_wrap_mail($message['body']);
  return $message;
}