You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs@cocoon.apache.org by do...@cocoon.apache.org on 2004/08/02 18:39:11 UTC
[Cocoon Wiki] Updated: ConfiguringTheLogs
Date: 2004-08-02T09:39:11
Editor: SteveKrulewitz <sh...@mm.st>
Wiki: Cocoon Wiki
Page: ConfiguringTheLogs
URL: http://wiki.apache.org/cocoon/ConfiguringTheLogs
no comment
Change Log:
------------------------------------------------------------------------------
@@ -284,7 +284,7 @@
</priority-target>
}}}
-== 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>smtp.mail.com</smtphost>
+ <to>errors@apache.org</to>
+ <from>cocoon@yourdomain.com</from>
+ <subject>A log message</subject>
+ <maximum-size>10</maximum-size>
+ <session/>
+</smtp>
+}}}
== !ServletTargetFactory ==
The configuration of a !SocketTargetFactory accepts following attributes: