"How to include generated content (i.e. content produced by a pipeline) into the body of an email sent by the sendmail logicsheet."

ChristianHaul explained, in a reply to my plea for assistance to the coocon-users list, that the correct way to do this is to use Cocoon's XSPUtil. In particular, use the util:get-source element, wrapped in xsp:expr.

---

Here's a sendmail XSP, mail.xsp that implements this:

{{{<?xml version="1.0" encoding="ISO-8859-1"?> <xsp:page language="java"

</xsp:page>}}}

You'd use the request parameters logicsheet to get to, from, and smtphost, in practice.

The sendmail logicsheet has been defined in cocoon.xconf, and a matcher added to the pipeline.

{{{<map:match pattern="send">

</map:match>}}}

We've also defined another pipeline for the payload:

{{{<map:match pattern="payload">

</map:match>}}}

MailBodyViaPipeline (last edited 2009-09-20 23:40:43 by localhost)