You are here

protected static function Messaging_HTML_Mail_Method::mail_send in Messaging 7

Actually send mail through Drupal system

Parameters

$mail: Built Drupal mail array, not rendered

$message: Original message object

Overrides Messaging_Mail_Method::mail_send

File

messaging_htmlmail/messaging_htmlmail.inc, line 75
Drupal Messaging Framework - Send_Method class file

Class

Messaging_HTML_Mail_Method
Base class for mail sending methods

Code

protected static function mail_send($mail, $message) {

  // Retrieve the responsible implementation for this message.

  //$system = drupal_mail_system($mail['module'], $mail['key']);
  if (!isset(self::$mail_system)) {
    self::$mail_system = new Messaging_HTML_MailSystem();
  }

  // Format the message body, last chance for formatting
  $mail = self::$mail_system
    ->format($mail);
  return self::$mail_system
    ->mail($mail);
}