You are here

function messaging_message_multisend in Messaging 6.2

Same name and namespace in other branches
  1. 6 messaging.module \messaging_message_multisend()

Message default callback: send iterating over all destinations

File

./messaging.module, line 359

Code

function messaging_message_multisend($message, $info) {
  $success = TRUE;
  foreach ($message->destinations as $to) {

    // Be careful with the order of function && value, so they both are evaluated
    $success = messaging_message_send_out($to, $message, $message->method) && $success;
  }

  // If sent, set time. If failed force logging.
  $success ? $message->sent = time() : ($message->log = 1);
  $message->success = $success;
  return $message;
}