You are here

function mail_logger_token_list in Mail Logger 6

Same name and namespace in other branches
  1. 7 mail_logger.module \mail_logger_token_list()

Implementation of hook_token_list().

File

./mail_logger.module, line 310
Mail Logger module logs all outgoing mail that passes through the drupal_mail function.

Code

function mail_logger_token_list($type = 'mail') {
  if ($type == 'mail') {
    $tokens['mail']['mlid'] = t('The unique mail ID.');
    $tokens['mail']['mailkey'] = t('The mail key.');
    $tokens['mail']['to'] = t("The mail recipient's e-mail address(es) as entered in the mail.");
    $tokens['mail']['to-raw'] = t("The unfiltered mail recipient's e-mail address(es) as entered in the mail. WARNING - raw user input.");
    $tokens['mail']['subject'] = t("The mail subject.");
    $tokens['mail']['subject-raw'] = t("The unfiltered mail subject. WARNING - raw user input.");
    $tokens['mail']['body'] = t("The mail message body.");
    $tokens['mail']['body-raw'] = t("The unfiltered mail message body. WARNING - raw user input.");
    $tokens['mail']['from'] = t("The mail sender's e-mail address as entered in the mail.");
    $tokens['mail']['from-raw'] = t("The unfiltered mail sender's e-mail address as entered in the mail. WARNING - raw user input.");
    $tokens['mail']['date'] = t("The date the mail was sent.");
    $tokens['mail']['language'] = t("The language of the mail.");
    return $tokens;
  }
}