You are here

function messaging_mail_messaging in Messaging 6.3

Same name and namespace in other branches
  1. 5 messaging_mail/messaging_mail.module \messaging_mail_messaging()
  2. 6.4 messaging_mail/messaging_mail.module \messaging_mail_messaging()
  3. 6 messaging_mail/messaging_mail.module \messaging_mail_messaging()
  4. 6.2 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 23
Simple mail using Drupal API. Messaging method plug-in

Code

function messaging_mail_messaging($op, $type = NULL) {
  switch ($op) {
    case 'send methods':
      $info['mail'] = array(
        'title' => 'Drupal mail',
        'name' => t('Mail'),
        // Name for display
        'group' => 'mail',
        // Class of sending method
        'destination' => 'mail',
        // Account property to use as destination
        'type' => MESSAGING_TYPE_SEND,
        // 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.'),
        'send callback' => 'messaging_mail_send_msg',
        // Sending callback
        'system accounts' => TRUE,
        // Supports multiple sending accounts
        'account type' => 'mail',
        // The type of system account to use
        'class' => 'Messaging_Mail_Method',
      );
      return $info;
  }
}