You are here

function messaging_message_send_out in Messaging 5

Same name and namespace in other branches
  1. 6 messaging.module \messaging_message_send_out()
  2. 6.2 messaging.module \messaging_message_send_out()
  3. 6.3 messaging.module \messaging_message_send_out()

Send for real, finally invoking method's callback function

This sends messages one by one, so the callback function only need to support a single destination Specific parameters for this message group are processed here too

Parameters

$destination: Single destination, may be email, user account, etc...

$message: Message array

$method: Sending method

Return value

boolean Message successfully sent

2 calls to messaging_message_send_out()
messaging_message_send in ./messaging.module
Send message to array of destinations. The message is rendered just once.
messaging_store_queue_process_step in ./messaging.store.inc
Retrieve and send queued messages

File

./messaging.module, line 529

Code

function messaging_message_send_out($destination, $message, $method) {
  if (($function = messaging_method_info($method, 'send')) && function_exists($function)) {

    // Check for specific parameters for this sending method
    $group = messaging_method_info($method, 'group');
    $params = !empty($message['params'][$group]) ? $message['params'][$group] : array();
    return $function($destination, $message, $params);
  }
  else {
    watchdog('messaging', t('Message could not be delivered for method %method', array(
      '%method' => $method,
    )), WATCHDOG_ERROR);
    return FALSE;
  }
}