You are here

public function MandrillHtmlMailSystem::format in Mandrill 7.2

Concatenate and wrap the email body for either plain-text or HTML emails.

Parameters

array $message: A message array, as described in hook_mail_alter().

Return value

array The formatted $message.

Overrides MandrillMailSystem::format

File

lib/mandrill.mail.inc, line 316
Implements Mandrill as a Drupal MailSystemInterface

Class

MandrillHtmlMailSystem
Sends themable HTML emails through the Mandrill mail system.

Code

public function format(array $message) {

  // Join the body array into one string.
  if (is_array($message['body'])) {
    $message['body'] = implode("\n\n", $message['body']);
  }
  return mandrill_prepare_message($message);
}