Title: SMTPAppender

Not exactly sure if this is what you were asking for.  But here is an entry we currently use to email error logs.  This works for individual logs.  If you are asking about how to attach a file to an email then this wouldn't help you to do that

 

#**************************************************************************

# SMTP Appender

# attention: make sure mail.jar and activation.jar are in your classpath

#**************************************************************************

log4j.appender.errorSMTP=org.apache.log4j.net.SMTPAppender

[EMAIL PROTECTED]

[EMAIL PROTECTED]

log4j.appender.errorSMTP.Subject=Help

log4j.appender.errorSMTP.SMTPHost=mailserver.net

log4j.appender.errorSMTP.layout=org.apache.log4j.PatternLayout

log4j.appender.errorSMTP.layout.ConversionPattern=%c - %m%n

----- Original Message -----
Sent: Wednesday, June 06, 2001 1:06 PM
Subject: SMTPAppender

Hello folks,

I´m using log4j-1.1.1 and I tried to use the SMTPAppender to send a logged file to a specified Email-Adress.

Can somebody give me a hint or link how a properties file has to look like to manage this step...

thanks a lot

Nik

Reply via email to