Return-Path: Delivered-To: apmail-jakarta-log4j-user-archive@jakarta.apache.org Received: (qmail 29010 invoked by uid 500); 5 Sep 2001 13:07:48 -0000 Mailing-List: contact log4j-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: "LOG4J Users Mailing List" Delivered-To: mailing list log4j-user@jakarta.apache.org Received: (qmail 28960 invoked from network); 5 Sep 2001 13:07:47 -0000 Sender: dogmatix@parijat.info.com.np Message-ID: <3B9624FB.631E76C5@info.com.np> Date: Wed, 05 Sep 2001 18:58:31 +0545 From: BillWorker 2i Development Team Organization: Infocom Pvt. Ltd. X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.12-20 i686) X-Accept-Language: en MIME-Version: 1.0 To: LOG4J Users Mailing List Subject: Re: SMTP Host and SMTP appender References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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