You are here

public function HTMLTestingMailSystem::format in Contact Storage 8

Implements MailSystemInterface::format().

Overrides MailInterface::format

File

src/Plugin/Mail/HTMLTestingMailSystem.php, line 24

Class

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

Namespace

Drupal\contact_storage\Plugin\Mail

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'] = MailFormatHelper::wrapMail($message['body']);
  return $message;
}