MailInterface::format

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.

Parameters

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

Return value

array The formatted $message.

See also

\Drupal\Core\Mail\MailManagerInterface

File

core/lib/Drupal/Core/Mail/MailInterface.php, line 33

Class

MailInterface
Defines an interface for pluggable mail back-ends.

Namespace

Drupal\Core\Mail

Code

public function format(array $message);
doc_Drupal
2016-10-29 09:25:14
Comments
Leave a Comment

Please login to continue.