Return-Path: Delivered-To: apmail-jakarta-log4j-user-archive@jakarta.apache.org Received: (qmail 92293 invoked by uid 500); 5 Sep 2001 12:40:54 -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 92271 invoked from network); 5 Sep 2001 12:40:53 -0000 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: SMTP Host and SMTP appender X-MimeOLE: Produced By Microsoft Exchange V6.0.4712.0 Date: Wed, 5 Sep 2001 13:40:21 +0100 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: SMTP Host and SMTP appender Thread-Index: AcE2B24F7KtvKLMdTWqhNkY0fCsUaAAAFKYA From: "Jon Skeet" To: "LOG4J Users Mailing List" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N > I am logging critical errors in the system using SMTPAppender=20 > in log4j. > It is working fine. My problem is that I want to send other=20 > emails from > my system using a different SMTP host than the one used for logging. >=20 > 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.=20 >=20 > 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... Jon --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: log4j-user-help@jakarta.apache.org