Thanks a lot ... now, it works perfectly ... I did not undersand cocoon
protocol, but now I have learned some things about it ... thanks again

Another question ... I'm generating pdf files in order to be attached. These
files are named depending on a certain random number. For example, there
could be next files:

CADi_334435345.pfd
CADi_453353423.pdf
CADi_343432342.pdf

The random number is "concated" to CADi_ string, forming another string.
Thus, I have a string, namen st2, that contains the file name.

I want to attach this files, but I don't know if I can do this:

st1="context://fitxers/CADi_343432342.pdf";
st2="CADi_343432342.pdf";
 <sendmail:attachment url=st1  mime-type="text/plain" name=st1>

Is there any way to set url and name dinamically?





----- Original Message -----
From: "Christian Haul" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 08, 2003 5:51 PM
Subject: Re: Sendmail attachment


> Josep Riudavets wrote:
> > I'm using Cocoon 2.1. In Cocoon documentatio, there is an example of
> > sending mail with attachment:
> >
> > <sendmail:send-mail>
> >       <sendmail:from>from address</sendmail:from>
> >       <sendmail:to>some maillinglist address</sendmail:to>
> >       <sendmail:subject><xsp-request:get-parameter
> > name="subject"/></sendmail:subject>
> >       <!-- Modify the next line to point to your mail server -->
> >       <sendmail:smtphost>localhost</sendmail:smtphost>
> >
<sendmail:body><xsp:expr>body.toString()</xsp:expr></sendmail:body>
>
> attach an uploaded file:
>
> >      * <sendmail:attachment>
> >         <sendmail:param
> >
name="object"><xsp:expr>request.get("attachment")</xsp:expr></sendmail:param
>
> >       </sendmail:attachment>
>
> attach a file located in your webapp folder ie. $COCOON:
>
> >       <sendmail:attachment url="context://welcome.xml"
> > mime-type="text/plain" name="foo.txt"/>
>
> attach a file generated by another cocoon pipeline:
>
> >       <sendmail:attachment url="cocoon:///"
> > mime-type="text/html"  name="welcome.html"/>
> > *
> >       <sendmail:on-success>
> >          <p>
> >            Email successfully sent.
> >          </p>
> >       </sendmail:on-success>
> >       <sendmail:on-error>
> >    <p style="color:red;">
> >            An error occurred: <sendmail:error-message/>
> >    </p>
> >       </sendmail:on-error>
> >     </sendmail:send-mail>
> >
> > I don't understand attachment taglibs. What does *"cocoon:///"* mean? If
> > I want to attach a file under "/usr/local/tomcat/webapps/cocoon/fitxers"
> > named "out.xml" ... how can I attach it? What's the syntax?
>
> context://fitxers/filename
>
> HTH
>
> (BTW if you had been a little more explicit eg about version numbers, I
> would have been able to help yesterday already.)
>
> Chris.
>
> --
> C h r i s t i a n       H a u l
> [EMAIL PROTECTED]
>      fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08
>
>
> ---------------------------------------------------------------------
> 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]

Reply via email to