public MailInterface::format(array $message)
Formats a message prior to sending.
Allows to preprocess, format, and postprocess a mail message before it is passed to the sending system. By default, all messages may contain HTML and are converted to plain-text by the Drupal\Core\Mail\Plugin\Mail\PhpMail implementation. For example, an alternative implementation could override the default implementation and also sanitize the HTML for usage in a MIME- encoded email, but still invoking the Drupal\Core\Mail\Plugin\Mail\PhpMail implementation to generate an alternate plain-text version for sending.
array $message: A message array, as described in hook_mail_alter().
array The formatted $message.
\Drupal\Core\Mail\MailManagerInterface
public function format(array $message);
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Mail!MailInterface.php/function/MailInterface::format/8.1.x