You are here

function phpmailer_send in PHPMailer 8.3

Same name and namespace in other branches
  1. 5.2 includes/phpmailer.drupal.inc \phpmailer_send()
  2. 5 includes/phpmailer.inc \phpmailer_send()
  3. 6.3 includes/phpmailer.drupal.inc \phpmailer_send()
  4. 6 includes/phpmailer.inc \phpmailer_send()
  5. 6.2 includes/phpmailer.drupal.inc \phpmailer_send()
  6. 7.4 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.

@todo This might be totally unnecessary in Drupal 8, but testing needs to be done to verify.

Parameters

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

Return value

TRUE if the mail was successfully accepted, otherwise FALSE.

See also

DrupalPHPMailer::mail()

1 call to phpmailer_send()
SettingsForm::submitForm in src/Form/SettingsForm.php
Form submission handler.

File

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

Code

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