You are here

function smtp_mail_send in SMTP Authentication Support 6

Send an e-mail.

1 string reference to 'smtp_mail_send'
smtp_drupal_mail_wrapper in ./smtp.module
Sends out the e-mail.

File

./smtp.module, line 812
Enables Drupal to send e-mail directly to an SMTP server.

Code

function smtp_mail_send($mail) {
  if (!$mail
    ->Send()) {
    watchdog('smtp', 'Error sending e-mail: !error_message', array(
      '!error_message' => $mail->ErrorInfo,
    ), WATCHDOG_ERROR);
  }
  else {
    watchdog('smtp', 'Sent queued mail');
    $mail
      ->SmtpClose();
  }
}