function monolog_native_mailer_handler_loader in Monolog 7
Same name and namespace in other branches
- 6 handlers/native_mailer.inc \monolog_native_mailer_handler_loader()
Monolog loader callback; Loads a NativeMailerHandler class.
Return value
HandlerInterface
File
- handlers/
native_mailer.inc, line 15 - Handler include for MailHandler.
Code
function monolog_native_mailer_handler_loader($options) {
if ('<site-mail>' == $options['to']) {
$options['to'] = variable_get('site_mail', ini_get('sendmail_from'));
}
if ('<site-mail>' == $options['from']) {
$options['from'] = variable_get('site_mail', ini_get('sendmail_from'));
}
return new NativeMailerHandler($options['to'], $options['subject'], $options['from'], $options['level'], $options['bubble']);
}