Can you set log4j.debug=true in your properties? you will get a lof of 
output to System.out, which will tell you how log4j is configuring itself.

btw, your config looks good. any chance that your mail system is doing 
something to the message?

Douglas E Wegscheid
Lead Technical Analyst, Whirlpool Corporation
(269)-923-5278

"A wrong note played hesitatingly is a wrong note. A wrong note played 
with conviction is interpretation."



DBW <dbw...@yahoo.com> wrote on 06/02/2010 06:00:19 PM:

> I've successfully configured SMTPAppender to send email, and am 
> receiving emails, but the "Subject" field is always empty, and the 
> "To" field is always "undisclosed-recipients" rather than the email 
> address of the recipient(s). Am I doing something wrong? Is there a 
> way to set the Subject? All of the other header fields are being 
> honored (e.g. From, SMTPHost, SmtpUsername, etc.).
> 
> I'm using log4j-1.2.16 and javamail 1.4.3.
> 
> Here is my config:
> 
>  log4j.appender.SmtpHandler=org.apache.log4j.net.SMTPAppender
>  log4j.appender.SmtpHandler.threshold=ERROR
>  log4j.appender.SmtpHandler.SMTPHost=mail.<hidden>.com
>  log4j.appender.SmtpHandler.SmtpUsername=<hidden>
>  log4j.appender.SmtpHandler.SmtpPassword=<hidden>
>  log4j.appender.SmtpHandler.Subject=Foo
>  log4j.appender.SmtpHandler.To=<hidden>
>  log4j.appender.SmtpHandler.From=SomeFromValue@<hidden>.com
>  log4j.appender.SmtpHandler.bufferSize=512
>  log4j.appender.SmtpHandler.layout=org.apache.log4j.PatternLayout
> 
> 
> Thanks,
> 
> Brad
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> For additional commands, e-mail: log4j-user-h...@logging.apache.org
> 

Reply via email to