public function MailSystemInterface::format

You are here

7 mail.inc public MailSystemInterface::format(array $message)

Format a message composed by drupal_mail() prior sending.

Parameters

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

Return value

The formatted $message.

2 methods override MailSystemInterface::format()
DefaultMailSystem::format in modules/system/system.mail.inc
Concatenate and wrap the e-mail body for plain-text mails.
MailTestCase::format in modules/simpletest/tests/mail.test
Concatenate and wrap the e-mail body for plain-text mails.

File

includes/mail.inc, line 302
API functions for processing and sending e-mail.

Class

MailSystemInterface
An interface for pluggable mail back-ends.

Code

public function format(array $message);

Comments

In D7 drupal_mail no longer does any formatting before calling the mail function. This function is expected to do 100% of the formatting.

At a minimum please call DefaultMailSystem::format or implement it's methods in your custom Mail System.