You are here

function messaging_debug_send_msg in Messaging 6

Same name and namespace in other branches
  1. 5 messaging_debug/messaging_debug.module \messaging_debug_send_msg()
  2. 6.2 messaging_debug/messaging_debug.module \messaging_debug_send_msg()
  3. 6.3 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 297
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();
  $text = t('Message %key for %name: %subject', array(
    '%name' => $destination,
    '%key' => $message->type,
    '%subject' => $message->subject,
  ));
  messaging_log($text);

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