Details
Description
I've configured an email appender like this:
return array(
'rootLogger' => array(
'level' => 'DEBUG',
'appenders' => array('email'),
),
'loggers' => array(
'ldap' => array(
'level' => 'DEBUG',
'appenders' => array('email'),
),
),
'appenders' => array(
'email' => array(
'class' =>
'LoggerAppenderMailEvent',
'layout' => array(
'class' =>
'LoggerLayoutPattern',
'conversionPattern' =>
"%d
%-5p %c %X
{username}: %m in %F at %L%n",
),
'from' => 'mail@kfv.at',
'to' => 'mail@kfv.at',
'subject' => 'Error',
'smtpHost' => '0.0.0.0',
),
),
);
But when I try to log, i get the following error:
PHP Warning: mail() [<a href='function.mail'>function.mail</a>]:
"sendmail_from" not set in php.ini or custom "From:"
header missing in ..\log4php\appenders\LoggerAppenderMailEvent.php on line
166
PHP Fatal error: Uncaught exception 'LoggerException' with message 'Error
sending mail to ''!' in
..\log4php\appenders\LoggerAppenderMailEvent.php:169
Stack trace:
#0 ..\log4php\LoggerAppender.php(134):
LoggerAppenderMailEvent->append(Object(LoggerLoggingEvent))
#1 ..\log4php\Logger.php(410):
LoggerAppender->doAppend(Object(LoggerLoggingEvent))
#2 ..\log4php\Logger.php(273):
Logger->callAppenders(Object(LoggerLoggingEvent))
#3 ..\log4php\Logger.php(331): Logger->forcedLog('Logger', NULL,
Object(LoggerLevel), 'Testlog')
#4 ..\log4php\Logger.php(216): Logger->logLevel('Testlog',
Object(LoggerLevel), NULL)
#5 ..\Ldap.class.php(9): Logger->debug('Testlog')
...
thrown in ..\log4php\appenders\LoggerAppenderMailEvent.php on line 169