public function MandrillMailSystem::format in Mandrill 7
Same name and namespace in other branches
- 6 mandrill.mail.inc \MandrillMailSystem::format()
- 7.2 lib/mandrill.mail.inc \MandrillMailSystem::format()
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 MailSystemInterface::format
File
- lib/
mandrill.mail.inc, line 22 - Implements Mandrill as a Drupal MailSystemInterface
Class
- MandrillMailSystem
- Modify the drupal mail system to use Mandrill when sending emails.
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 $message;
}