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; } } /** * Send mail message to user account * * This is a callback function that will be invoked from messaging delivery methods * * @see messaging_message_send() * @see messaging_mail_params() * @see drupal_mail() * * @param $destination * Single email address * @param $message * Message array * @param $params * Optional parameters for this method type */ function messaging_mail_send_msg($destination, $message, $params = array()) { $params = messaging_mail_params($message, $params); return drupal_mail($params['mailkey'], $destination, $message['subject'], $message['body'], $params['from'], $params['headers']); }