You are here

function Messaging_Send_Method::send_address in Messaging 6.4

Same name and namespace in other branches
  1. 7 messaging.method.inc \Messaging_Send_Method::send_address()

Send message to address, use sending callback

3 calls to Messaging_Send_Method::send_address()
Messaging_Send_Method::message_multisend in includes/messaging_method.class.inc
Message default callback: send iterating over all destinations
Messaging_Send_Method::message_send in includes/messaging_method.class.inc
Send message to a single destination
Messaging_Send_Method::send_destination in includes/messaging_method.class.inc
Send message to destination, use sending callback

File

includes/messaging_method.class.inc, line 198
Drupal Messaging Framework - Send_Method class file

Class

Messaging_Send_Method
Sending method, implements all specific method functionality

Code

function send_address($address, $message) {
  if ($send_callback = $this
    ->get_info('send callback')) {

    // For this case, we render it before so it is compatible with old send methods
    $message
      ->render();
    $params = $message
      ->get_method_params($this->method) + $this
      ->default_params();
    return call_user_func($send_callback, $address, $message, $params);
  }
  else {
    watchdog('messaging', 'Message could not be delivered for method %method', array(
      '%method' => $this->method,
    ), WATCHDOG_ERROR);
  }
}