logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DBW <dbw...@yahoo.com>
Subject Re: SMTPAppender: empty Subject and To
Date Sat, 05 Jun 2010 20:06:15 GMT
Thanks for the response. I set debug=true and didn't find anything of interest, but then I
noticed that geronimo-javamail is on my classpath in addition to sun mail.jar. I suspect this
is the root of my problem.

Thanks,

Brad




----- Original Message ----
From: Douglas E Wegscheid 

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 <dbwbca@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-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message