You are here

function messaging_debug_send_msg in Messaging 6.3

Same name and namespace in other branches
  1. 5 messaging_debug/messaging_debug.module \messaging_debug_send_msg()
  2. 6 messaging_debug/messaging_debug.module \messaging_debug_send_msg()
  3. 6.2 messaging_debug/messaging_debug.module \messaging_debug_send_msg()

Just show message title to the user.

This is a pull method though, so this is mainly intended for testing options

2 string references to 'messaging_debug_send_msg'
messaging_debug_messaging in messaging_debug/messaging_debug.module
Implementation of hook_messaging
messaging_debug_messaging_methods_alter in messaging_debug/messaging_debug.module
Implementation of hook_messaging_methods_alter()

File

messaging_debug/messaging_debug.module, line 430
Simple messaging using html page. Messaging method plug-in

Code

function messaging_debug_send_msg($destination, $message) {

  // Just logs everything and mark the message for logging too.
  $message->log = 1;
  $text = '';
  $watchdog = array();
  $content = $message
    ->render();
  $variables = array(
    '%name' => $destination,
    '%key' => $message->type,
    '%subject' => $message->subject,
    '!body' => $message->body,
  );
  messaging_log('Message %key for %name: %subject', $variables);

  // Just log message body at the end
  watchdog('messaging', 'Message %key for %name: %subject <br /> Message body: <br /><pre>!body</pre>', $variables);
  return TRUE;
}