You are here

function messaging_privatemsg_messaging in Messaging 6.4

Same name and namespace in other branches
  1. 6 messaging_privatemsg/messaging_privatemsg.module \messaging_privatemsg_messaging()
  2. 6.2 messaging_privatemsg/messaging_privatemsg.module \messaging_privatemsg_messaging()
  3. 6.3 messaging_privatemsg/messaging_privatemsg.module \messaging_privatemsg_messaging()

Implementation of hook_messaging

File

messaging_privatemsg/messaging_privatemsg.module, line 12
Simple mail using Drupal API. Messaging method plug-in

Code

function messaging_privatemsg_messaging($op) {
  switch ($op) {
    case 'send methods':
      $info['privatemsg'] = array(
        'title' => 'Privatemsg',
        'name' => t('Private message'),
        'group' => 'web',
        'type' => MESSAGING_TYPE_SEND,
        'address_type' => 'user',
        // Which kind of address this method uses
        'access' => 'read privatemsg',
        'glue' => "\n",
        'description' => t('Send messages through Privatemsg'),
        'send callback' => 'messaging_privatemsg_send_msg',
        // Sending callback
        'filter' => 'messaging_filter',
        // Default filter for this format
        'anonymous' => FALSE,
      );
      return $info;
  }
}