cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Themba Mbatha <>
Subject Mailer Action.
Date Mon, 24 Jun 2002 12:05:37 GMT
Hi All;

I just developed an emailing action that I use to send email to users based
on what they do on my site (e.g. registering users get sent their user name,
etc). The mailer uses pipelines for content to send through to users:

<map:action name="email" src="">

<map:match pattern="email/register">
  <map:generate src="content/registered.xsp" type="serverpages"/>
  <map:serialize type="xml"/>

<map:match pattern="register">
  <map:act type="add-user">
    <map:act type="email">
      <map:parameter name="descriptor" value="content/email/config.xml"/>
      <map:parameter name="reloadable" value="true"/>
      <map:redirect-to uri="welcome.html"/>

The config specified here would look like this:

<?xml version="1.0"?>
   <header from="" subject="Welcome to xxx"/>
   <body src="context://email/register">
	   <part src="context://stylesheets/email-html.xsl"

The action is currently implemented with JavaMail 1.2. However, I am not
happy with the fact that I have to write out the transformed events (SAX)
into a StringWriter. This consumes scarce memory resources. So I'm writting
SMTP capabilities into the Action which should enable me to write the
transform events into an Socket's output stream. 

This code borrows elements from this implementation
r,p=JavaMail1) at IBM's developerWorks.

I just want to let everyone know about this, and would welcome any

View raw message