function drupal_mail_wrapper in Queue Mail 5
Same name and namespace in other branches
- 6 queue_mail.inc \drupal_mail_wrapper()
Wrapper function to use job queue
File
- ./
queue_mail.inc, line 6
Code
function drupal_mail_wrapper($mailkey, $to, $subject, $body, $from, $headers) {
if (function_exists('job_queue_add')) {
job_queue_add('queue_mail_send', t('Queued email'), array(
$mailkey,
$to,
$subject,
$body,
$from,
$headers,
));
}
else {
// Fallback on regular sending of email, just in case
queue_mail_send($mailkey, $to, $subject, $body, $from, $headers);
}
}