logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From BillWorker 2i Development Team <billwor...@info.com.np>
Subject Re: SMTP Host and SMTP appender
Date Wed, 05 Sep 2001 13:13:31 GMT
Jon Skeet wrote:
> Despite my previous comment (ie log4j really *is* broken, and I'll be
> patching it) I suspect your code is flawed as well - how are you setting
> the smtp host in *your* code?
> 
> Rather than
> 
> Properties props = System.getProperties();
> props.setProperty (...);
> 
> you should use
> 
> Properties props = new Properties (System.getProperties());
> props.setProperty (...);
> 

I am using Properties props = new Properties();
props.setProperty(....);

Anyway, my mistake was I was using
Session session = Session.getDefaultInstance(props, null);

I have now replaced it with 
Session session = Session.getInstance(props, null);

I will check if it works tomorrow.


Ashish Shrestha.

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


Mime
View raw message