function emaillog_mail in Logging and alerts 6
Same name and namespace in other branches
- 8 emaillog/emaillog.module \emaillog_mail()
- 6.2 emaillog/emaillog.module \emaillog_mail()
- 7.2 emaillog/emaillog.module \emaillog_mail()
- 7 emaillog/emaillog.module \emaillog_mail()
- 2.0.x emaillog/emaillog.module \emaillog_mail()
Implementation of hook_mail().
File
- emaillog/
emaillog.module, line 54 - Sends logs and alerts to email addresses.
Code
function emaillog_mail($key, &$message, $params) {
if ($key == 'alert') {
$severity_levels = watchdog_severity_levels();
$message['subject'] = t('[@site_name] @severity_desc: @dblog_message', array(
'@site_name' => variable_get('site_name', 'Drupal'),
'@severity_desc' => drupal_strtoupper($severity_levels[$params['severity']]),
'@dblog_message' => _emaillog_format_dblog_message($params),
));
$message['body'] = theme('emaillog_format', $params, $message);
}
}