t('Mail'), 'send' => 'messaging_mail_send', 'type' => MESSAGING_TYPE_PUSH, 'render' => 'messaging_mail_render', 'glue' => "\n", ); return $info; } } /** * Message Render callback */ function messaging_mail_render($message, $info) { if (isset($message['body']['footer'])) { $message['body']['footer'] = array('#prefix' => "\n--", '#text' => $message['body']['footer']); } $message['subject'] = messaging_message_render($message['subject'], $info); $info['glue'] = "\n"; $message['body'] = messaging_message_render($message['body'], $info); return $message; } /** * Send mail message to user account */ function messaging_mail_send($account, $message) { $mailkey = 'message-'.$message['type']; $to = $account->mail; return drupal_mail($mailkey, $to, $message['subject'], $message['body']); }