From: Matthias W. <mat...@ya...> - 2008-11-21 05:29:36
|
Hello, I am following the FAQs and try to send SMTP mail via Log4Perl. I first tried this configuration: log4perl.category = FATAL, Mailer log4perl.appender.Mailer = Log::Dispatch::Email::MailSend log4perl.appender.Mailer.to = x@z.com log4perl.appender.Mailer.from = y@z.com log4perl.appender.Mailer.subject = Something's broken! log4perl.appender.Mailer.layout = SimpleLayout log4perl.appender.Mailer.Server = x.x.x.x log4perl.appender.Mailer.smtp = 1 log4perl.appender.Mailer.buffer=0 This did not work as smtp is a scalar reference in the constructor of Mail::Mailer and log4perl seems to call it only with hashes. Then I tried the suggestion of the module desciption for Log::Dispatch::Email::MailSend and tried "use Mail::Mailer 'smtp', Server => 'foo.example.com';" which did not work either. (Cannot locate 'Server' at log4Perl.pl line 1 Warning: something's wrong at /opt/ActivePerl-5.8/site/lib/Mail/Mailer.pm line 278). If possible I would like to avoid writing my own appender. Does someone use Log4Perl with SMTP and can help me? Thanks in advance, Matthias |