You are here

function notifications_process_send in Notifications 6.2

Same name and namespace in other branches
  1. 5 notifications.cron.inc \notifications_process_send()
  2. 6 notifications.cron.inc \notifications_process_send()
  3. 6.3 notifications.cron.inc \notifications_process_send()

Send array of messages through messaging module

Parameters

$account: User account to send to, may be an anonymous user account with destination

$messages: Array of messages prepared for sending

$test: Optional just test composition and formating but do not send

File

./notifications.cron.inc, line 460

Code

function notifications_process_send($account, $messages, $send_method, $test = FALSE) {
  foreach ($messages as $message) {
    notifications_process('count', 'send');
    notifications_debug('Sending out notification', array(
      'method' => $send_method,
      'message' => $message,
    ));
    notifications_message_send($account, $message, $send_method, $test);
  }
  return $messages;
}