function smtp_send_queue_runner in SMTP Authentication Support 7.2
Same name and namespace in other branches
- 8 smtp.module \smtp_send_queue_runner()
- 7 smtp.module \smtp_send_queue_runner()
1 string reference to 'smtp_send_queue_runner'
- smtp_cron_queue_info in ./smtp.module
- Implementation of hook_cron_queue_info().
File
- ./smtp.module, line 170
- Enables Drupal to send e-mail directly to an SMTP server.
Code
function smtp_send_queue_runner($message) {
$logging = variable_get('smtp_debugging', SMTP_LOGGING_ERRORS);
if (!empty($message['mailer']) && is_object($message['mailer'])) {
if (!$message['mailer']
->Send()) {
if ($logging == SMTP_LOGGING_ALL || $logging == SMTP_LOGGING_ERRORS) {
watchdog('smtp', 'Error sending e-mail from @from to @to, will retry on cron run : !error_message.', array(
'@from' => $message['from'],
'@to' => $message['to'],
'!error_message' => $message['mailer']->ErrorInfo,
), WATCHDOG_ERROR);
}
}
return;
}
if ($logging == SMTP_LOGGING_ALL) {
watchdog('smtp', 'Sending mail to: @to', array(
'@to' => $message['to'],
));
}
$mail_system = new SmtpMailSystem();
$mail_system
->mailWithoutQueue($message);
}