logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jon Skeet" <jon.sk...@peramon.com>
Subject RE: SMTP Host and SMTP appender
Date Wed, 05 Sep 2001 12:40:21 GMT
> I am logging critical errors in the system using SMTPAppender 
> in log4j.
> It is working fine. My problem is that I want to send other 
> emails from
> my system using a different SMTP host than the one used for logging.
> However, I am not able to do this. Even though I set the smtp host in
> the property before creating a session using JavaMail. My code still
> uses the smtp host set in the log4j smtp appender. 
> Doesn't JavaMail support multiple smtp hosts in the same jvm?

It certainly does - unfortunately, SMTPAppender.java is changing the
*system* properties rather than creating a new Properties object which
uses the System properties as a set of defaults (which is the more
correct way of doing things, to my mind).

I'll submit a patch for it if it's still broken in CVS...


To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org

View raw message