You are here

function phpmailer_send in PHPMailer 7.4

Same name and namespace in other branches
  1. 8.3 includes/phpmailer.drupal.inc \phpmailer_send()
  2. 5.2 includes/phpmailer.drupal.inc \phpmailer_send()
  3. 5 includes/phpmailer.inc \phpmailer_send()
  4. 6.3 includes/phpmailer.drupal.inc \phpmailer_send()
  5. 6 includes/phpmailer.inc \phpmailer_send()
  6. 6.2 includes/phpmailer.drupal.inc \phpmailer_send()
  7. 7.3 includes/phpmailer.drupal.inc \phpmailer_send()

Sends an already formatted e-mail message composed by drupal_mail().

@todo Consider to either drop this entirely, or move into phpmailer.module as singleton to instantiate the DrupalPHPMailer class.

Parameters

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

Return value

bool TRUE if the mail was successfully accepted, otherwise FALSE.

See also

DrupalPHPMailer::mail()

1 call to phpmailer_send()
phpmailer_settings_form in ./phpmailer.admin.inc
Form builder for both the Mime Mail settings and our own settings page.

File

includes/phpmailer.drupal.inc, line 22
Implements PHPMailer support on behalf of Drupal core.

Code

function phpmailer_send(array $message) {
  $mail =& drupal_static(__FUNCTION__);
  if (!isset($mail)) {
    $mail = new DrupalPHPMailer();
  }
  return $mail
    ->mail($message);
}