> -----Original Message----- > From: Christian Decker [mailto:[EMAIL PROTECTED] > Sent: dinsdag 30 september 2008 1:37 > To: [email protected] > Subject: Re: SendMailTransformer > > > > Felix Knecht-2 wrote: > > > > See also http://cocoon.apache.org/2.2/blocks/mail/1.0/1099_1_1.html > > You can use jx-generator instead of default generator to > get some data > > into the 'sendmail.xml'. > > > Thanks for your fast reply, it's been quite some time since I > last changed the sitemap so please forgive me for asking > trivial questions. What I have to do now is make a mapping > for a URL to the flowscript that would kick off the sending > of the email. Now my problem is how do I kick off the sending > from inside the flowscript as I only ever used > cocoon.showPage to display screens, but that isn't what I > want to do, right? I want to call a pipeline that somehow > looks like this > > <map:match pattern="mail/(.*)"> > <map:generate type="jx" src="mails/{1}.xml"/> > <map:transform type="sendmail"/> > <map:serialize type="xml"/> > </map:match> > > what would I do to call this? And why would I serialize in > the pipe? I thought that the transform already sends the > mail. I would then later in the flowscript show another > screen to tell the user what happened, so there > cocoon.showPage would be in order again ^^
Don't you mean sendPage instead of showPage? If you want to execute the pipeline that does the mailing and then go on in your Flowscript, use cocoon.processPipelineTo, otherwise use cocoon.sendPage [1]. The serialize is necessary because you start your SAX events with the generate and it has to be finished somewhere. It will contain the XML of the result of the SendMailTransformer (success, error). [1] http://cocoon.apache.org/2.2/blocks/flowscript/1.0/1382_1_1.html Regards, Jasha Joachimsthal [EMAIL PROTECTED] - [EMAIL PROTECTED] www.onehippo.com Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466 San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA 94952-3329 +1 (707) 773-4646 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
