Skip to content

Instantly share code, notes, and snippets.

@zachseifts
Created December 15, 2011 22:27
Show Gist options
  • Save zachseifts/1483221 to your computer and use it in GitHub Desktop.
Save zachseifts/1483221 to your computer and use it in GitHub Desktop.
<?php
/**
* Worker function for the EmailQueue
*
* @param
* An associative array containing:
* - to: A valid email address that the message will be sent to.
* - subject: The subject of the email message
* - body: The body of the email message
* - headers: Additional headers for the email message
*/
function email_queue_worker($data) {
drupal_mail_send($data);
watchdog('thing',
'EmailQueueWorker: Sending email to: @to containing: @body',
array('@to' => $data['to'], '@body' => $data['body']),
WATCHDOG_INFO);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment