Dear Michael,
you may have forgotten to call:

 smtpApp.activateOptions();
Thilo

-----Original Message-----
From: Michael Roytman [mailto:[EMAIL PROTECTED]]
Sent: Donnerstag, 31. Mai 2001 21:50
To: LOG4J Users Mailing List
Subject: Yet another SMTP appender question


Hello,

can somebody please let me know what the problem is here?
I am trying to create a SMTP appender. The SMTPMin example from log4j core
works fine but when I try to create smtp appender programmatically
I get "log4j:ERROR Message object not configured." error.
Instead of configuring froma config file I simply do this:

      SMTPAppender smtpApp = new SMTPAppender();
      smtpApp.setOption("From", "[EMAIL PROTECTED]");
      smtpApp.setOption("To", "[EMAIL PROTECTED]");
      smtpApp.setOption("SMTPHost", "10.1.1.7");
      smtpApp.setOption("LocationInfo", "true");
      smtpApp.setOption("Subject", "Testing");
      smtpApp.setLayout(new PatternLayout());
      BasicConfigurator.configure(smtpApp);
---->>>>> smtpApp.activateOptions();
      cat.addAppender(smtpApp);

Am I missing something?
Thanks!

Michael

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to