function workbench_email_mail_alter in Workbench Email 7.3
Implements hook_mail_alter().
File
- ./
workbench_email.module, line 278 - Code for the Workbench Email Module.
Code
function workbench_email_mail_alter(&$message) {
if (isset($message['id']) && $message['id'] == 'workbench_email_we_transition') {
$queue_mail = variable_get('workbench_email_queue_mail');
if ($queue_mail) {
// Store the message for sending on cron.
workbench_email_get_queue()
->createItem($message);
// Prevent the message from being sent.
$message['send'] = FALSE;
}
}
}