You are here

function mail_logger_read_mail in Mail Logger 6

Same name and namespace in other branches
  1. 5 mail_logger.module \mail_logger_read_mail()
  2. 7 mail_logger.pages.inc \mail_logger_read_mail()
1 string reference to 'mail_logger_read_mail'
mail_logger_menu in ./mail_logger.module
Implementation of hook_menu().

File

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

Code

function mail_logger_read_mail($id) {
  if (!isset($id) || !is_numeric($id)) {
    return 'Invalid Mail Logger ID parameter';
  }
  elseif ($mail = mail_logger_load($id)) {
    drupal_add_css(drupal_get_path('module', 'mail_logger') . '/mail_logger.css');
    return theme('mail_logger_read_mail', $mail);
  }
  else {
    return t('No Mail Logger record found with id: %id', array(
      '%id' => $id,
    ));
  }
}