ImagoX Mail Extension
The ImagoX Mail Extension is an implementation of a mail
sending mechanism. ImagoX Mail can send email to one or more "to" or "bcc" addresses,
and HTML markup may be included.
The configuration for this extension must be placed in the
imago.properties
file. All configuration options must be prefixed with
<mailorg.xenei.imagox.ImagoMail . For options that begin with
<defaults> the <defaults> tag should be replaced with the name of the
default options. In the example the defaults are defined as "special". This set of
defaults is used in Example 2. ImagoX extension configuration information is available
here.
Example 1: This example does not use the <defaults> mechanism and so specifies every option in the XML and XSL documents. XML to="foo@xenei.net, bar@xenei.net" from="example1@xenei.net" bcc="theLurker@xenei.net" cc="archives@xenei.net" reply-to="webmaster@xenei.net" subject="The example 1 message" > This is the body of the message. Any HTML markup will be transformed using the current stylesheet. </mail> XSL
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"version="1.0" xmlns:xmail="xalan://org.xenei.imago.extensions.ImagoMail" extension-element-prefixes="xmail" > .... <xsl:template match="mail"> <xmail:send to="{@mailto}" from="{@mailfrom}" subject="{@subject}"> to="{@to}" from="{@from}" bcc="{@bcc}" cc="@{cc}" reply-to="@{reply-to}" subject="{@subject}" > <xsl:apply-templates/> </xmail:send> </xsl:template> Example 2: This example uses the <defaults> mechanism. The defaults are shown as "special" here. XML This is the body of the message. Any HTML markup will be transformed using the current stylesheet. </mail> XSL
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"version="1.0" xmlns:xmail="xalan://org.xenei.imago.extensions.ImagoMail" extension-element-prefixes="xmail" > .... <xsl:template match="mail"> <xmail:send default="{@default}" to="{@mailto}" from="{@mailfrom}" subject="{@subject}"> to="{@to}" from="{@from}" bcc="{@bcc}" cc="@{cc}" reply-to="@{reply-to}" subject="{@subject}" > <xsl:apply-templates/> </xmail:send> </xsl:template> |