It has just been pointed out that another problem with SMTPAppender is
that it uses Session.getDefaultInstance rather than Session.getInstance,
which means again that it's invasive.
Here's another patch (still against the current CVS SMTPAppender, ie
incorporating the previous patch too).
Jon
--- SMTPAppender.java.orig Wed Sep 5 13:41:49 2001
+++ SMTPAppender.java Wed Sep 5 14:13:42 2001
@@ -84,12 +84,12 @@
recipient, from, etc. */
public
void activateOptions() {
- Properties props = System.getProperties();
+ Properties props = new Properties (System.getProperties());
if (smtpHost != null)
props.put("mail.smtp.host", smtpHost);
- Session session = Session.getDefaultInstance(props, null);
+ Session session = Session.getInstance(props, null);
//session.setDebug(true);
msg = new MimeMessage(session);
--- SMTPAppender.java.orig Wed Sep 5 13:41:49 2001
+++ SMTPAppender.java Wed Sep 5 14:13:42 2001
@@ -84,12 +84,12 @@
recipient, from, etc. */
public
void activateOptions() {
- Properties props = System.getProperties();
+ Properties props = new Properties (System.getProperties());
if (smtpHost != null)
props.put("mail.smtp.host", smtpHost);
- Session session = Session.getDefaultInstance(props, null);
+ Session session = Session.getInstance(props, null);
//session.setDebug(true);
msg = new MimeMessage(session);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]