Am Sonntag, 9. Oktober 2005 12:46 schrieb Christofer Dutz:

Hello,

> I am working on this for quite some time and my brain is running dry at the
> moment :-(
>
> I have a small shoping cart, where all information is stored in a simple
> w3c dom object. What I would like to know how I can do the following:


> Generate and send a nicely formatted Email from the dom-object:
>
> 1.      somehow generate content form the flow object
> 2.      do an XSLT to make it look nice
> 3.      send the email to a fixed address and one defined in the dom-object
> 4.      show the user some failure/success page

You could just do it like this:

(from flow):
cocoon.sendPage("my-email-pipeline",{data:mydomdata});

and then

<map:match pattern="my-email-pipeline">
<map:generate src="module:flow-attr:data" />
<map:transform src="data2email.xsl" />
<map:transform type="sendmail" />
<map:transform src="email2html.xsl" />
<map:serialize type="html" />
</map>

See the docs of the sendmailtransformer on how to send an email.

HTH
Christoph

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to