You are here

function messaging_mail_messaging in Messaging 5

Same name and namespace in other branches
  1. 6.4 messaging_mail/messaging_mail.module \messaging_mail_messaging()
  2. 6 messaging_mail/messaging_mail.module \messaging_mail_messaging()
  3. 6.2 messaging_mail/messaging_mail.module \messaging_mail_messaging()
  4. 6.3 messaging_mail/messaging_mail.module \messaging_mail_messaging()
  5. 7 messaging_mail/messaging_mail.module \messaging_mail_messaging()

Implementation of hook_messaging()

Currently the only operation supported is 'send methods' that will retrieve and array with information fo the sending methods provided by this module.

Parameters

$op: Type of information to retrieve.

Return value

mixed Depending on $op

File

messaging_mail/messaging_mail.module, line 20
Simple mail using Drupal API. Messaging method plug-in

Code

function messaging_mail_messaging($op) {
  switch ($op) {
    case 'send methods':
      $info['mail'] = array(
        'name' => t('Mail'),
        // Name for display
        'group' => 'mail',
        // Class of sending method
        'destination' => 'mail',
        // Account property to use as destination
        'send' => 'messaging_mail_send_msg',
        // Sending callback
        'type' => MESSAGING_TYPE_PUSH,
        // Method type: push || pull
        'glue' => "\n",
        // Glue for message body lines
        'footer' => "\n--",
        // Separator for message footer
        'description' => t('Send e-mails using the default Drupal mail library.'),
      );
      return $info;
  }
}