Try this:
<xsp:logic>
String myUrl = "cocoon:/recap_cmd/" + parameters.getParameter("cmd_id");
<!-- pass your sitemapparameter in your pipeline -->
</xsp:logic>
<mail:param name="url"><xsp:expr>myUrl</xsp:expr></mail:param>�
Maybe that will work,
Kind Regards,
Jan
----- Original Message -----
From: "Johannes Textor" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 15, 2004 11:24 PM
Subject: Re: sendmail:attachment dynamic parameter?
> Hi,
>
> I think the problem might be the following:
> The xsp: and mail: logicsheets both convert tags into Java code. Since
> the xsp: logicsheet
> is applied last, the content of the mail:param tag is literally:
>
> cocoon:/recap_cmd/<xsp:expr><util:get-sitemap-parameter
> name="cmd_id"/></xsp:expr>
>
> at the time the mail: logicsheet is applied, so the xsp:expr is
> evaluated AFTERWARDS.
> I suppose that there is a <xsl:value-of> tag somewhere inside the
> sendmail logicsheet,
> which would then return "cocoon:/recap_cmd/" as the value of "mail:param".
>
> In your case it might work if you drop the "<xsp:expr>" tags around the
> "xsp-request:get-parameter"
> and then change the order the logicsheets are applied in cocoon.xconf
> (sendmail is the last
> listed logicsheet in my cocoon.xconf, so I guess it will be applied
> first). Please correct me if
> I'm wrong.
>
> Christian Haul wrote:
>
> > julien bloit wrote:
> >
> >> Hi,
> >>
> >> I use cocoon 2.1.3 and having a little trouble to send mail with
dynamic
> >> content, using the sendmail logicsheet.
> >> Here's an xsp snippet that works :
> >>
> >> <mail:send-mail>
> >> <mail:charset>ISO-8859-1</mail:charset>
> >> <mail:smtphost><xsp:expr>smtphost</xsp:expr></mail:smtphost>
> >> <mail:from>[EMAIL PROTECTED]</mail:from>
> >> <mail:to><xsp:expr>email</xsp:expr></mail:to>
> >> <mail:subject>shop : your command</mail:subject>
> >> <mail:body><xsp:expr>mailBody</xsp:expr></mail:body>
> >> <mail:attachment mime-type="text/xml" name="commande.xml">
> >> <mail:param name="url">cocoon:/recap_cmd/24</mail:param>
> >> </mail:attachment>
> >> </mail:send-mail>
> >>
> >> but I need the attachment 'url' parameter to be dynamic , i.e. like
> >> this :
> >>
> >> <mail:param
> >> name="url">cocoon:/recap_cmd/<xsp:expr><util:get-sitemap-parameter
> >> name="cmd_id"/></xsp:expr></mail:param>
> >>
> >> which doesn't work (although pulling in the sitemap parameter works
> >> elsewhere in the xsp).
> >>
> >> Has someone got any clue on how I could fix this?
> >
> >
> > AFAIK this should work. Could you check the generated source or even
> > better, check with an XSL debugger (or just apply the sendmail.xsl
> > manually)?
> >
> > Chris.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]