1 system.mail.inc | public DefaultMailSystem::format(array $message) |
Concatenate and wrap the email body for plain-text mails.
Parameters
$message: A message array, as described in hook_mail_alter().
Return value
The formatted $message.:
Overrides MailSystemInterface::format
File
- core/
modules/ system/ system.mail.inc, line 20 - Backdrop core implementations of MailSystemInterface.
Class
- DefaultMailSystem
- The default Backdrop mail backend using PHP's mail function.
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 and wrap the mail body for sending.
// Note that backdrop_html_to_text() already calls backdrop_wrap_mail(), so
// it is not necessary to call that explicitly again.
$message['body'] = backdrop_html_to_text($message['body']);
return $message;
}