cocoon-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Cocoon Wiki] Updated: ConfiguringTheLogs
Date Mon, 02 Aug 2004 16:39:11 GMT
   Date: 2004-08-02T09:39:11
   Editor: SteveKrulewitz <>
   Wiki: Cocoon Wiki
   Page: ConfiguringTheLogs

   no comment

Change Log:

@@ -284,7 +284,7 @@
-==  SMTP!TargetFactory  ==
+==  SMTPTargetFactory  ==
 The configuration of a SMTP!TargetFactory accepts following attributes:
  *  id attribute specifies the target name, used in the category definition for referring
to this target. 
  *  context-key attribute specifies the context key, storing the required !JavaMail Session
object, by default the context-key session-context is used.
@@ -295,6 +295,19 @@
  *  subject the subject value
  *  maximum-size defines the maximum numbers of logevents per mail
  *  format
+Note that the SMTP!TargetFactory requires a !JavaMail Session object in the context, however,
there is no way to place this object in the context when Cocoon starts up.  To get around
this, add a {{{<session/>}}} element into the target configuration.  This causes a !JavaMail
Session object to be created and configured with the child elements of this element, although
just an empty element worked fine for me.  Here is a sample of an smtp log target:
+<smtp id="core" context-key="session-context">
+  <smtphost></smtphost>
+  <to></to>
+  <from></from>
+  <subject>A log message</subject>
+  <maximum-size>10</maximum-size>
+  <session/>
 ==  !ServletTargetFactory  ==
 The configuration of a !SocketTargetFactory accepts following attributes:

View raw message