function messaging_debug_send_msg in Messaging 5
Same name and namespace in other branches
- 6 messaging_debug/messaging_debug.module \messaging_debug_send_msg()
- 6.2 messaging_debug/messaging_debug.module \messaging_debug_send_msg()
- 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_message_send in ./
messaging.module - Send message to array of destinations. The message is rendered just once.
File
- messaging_debug/
messaging_debug.module, line 111 - Simple messaging using html page. Messaging method plug-in
Code
function messaging_debug_send_msg($destination, $message) {
// Just logs everything.
$text = '';
$count = 0;
$watchdog = array();
$text = t('Message %key for %name: %subject', array(
'%name' => $destination->name,
'%key' => $message['type'],
'%subject' => $message['subject'],
));
messaging_log($text);
$watchdog[] = t('Message body:') . '<br /><pre>' . $message['body'] . '</pre>';
// Just log message body at the end
watchdog('messaging', implode('<br />', $watchdog));
return TRUE;
}