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 = [EMAIL PROTECTED]
log4perl.appender.Mailer.from = [EMAIL PROTECTED]
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



      

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
log4perl-devel mailing list
log4perl-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/log4perl-devel

Reply via email to