function emaillog_watchdog in Logging and alerts 7
Same name and namespace in other branches
- 6.2 emaillog/emaillog.module \emaillog_watchdog()
- 6 emaillog/emaillog.module \emaillog_watchdog()
- 7.2 emaillog/emaillog.module \emaillog_watchdog()
File
- emaillog/
emaillog.module, line 41 - Drupal Module: Email Logging and Alerts
Code
function emaillog_watchdog($log) {
$to = variable_get('emaillog_' . $log['severity'], '');
if ($to) {
// Send email only if there is an email address.
// Otherwise the message is ignored by this module.
$language = user_preferred_language($log['user']);
drupal_mail('emaillog', 'alert', $to, $language, $log);
}
}