Hi Josep,

The cocoon:/// indicates an internal pipeline request - meaning 
it refers to a pipeline, and not directly to a file.

The documentation shows an email with three attachments just to 
show you the various possibilities.

For your need (reading a simple file), just use the example for 
context:.

i.e.

<sendmail:attachment url="context://fitxers/out.xml"
mime-type="text/xml"  name="out.xml"/>

Peter

P.S. cocoon://file.xml
            // indicates use top level sitemap context, look for 
                        a pipeline match for the URL file.xml
        cocoon:/file.xml
            / indicates use current possibly sub-sitemap context,
                         look for a pipeline match for the URL file.xml
        context:// 
            indicates use the web application context directory

        cocoon:///file.xml
            /// ??? maybe a mistake?

-----Original Message-----
From: Josep Riudavets [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 08, 2003 11:25 AM
To: [EMAIL PROTECTED]
Subject: Re: Sendmail attachment


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>
      <sendmail:attachment>
        <sendmail:param
name="object"><xsp:expr>request.get("attachment")</xsp:expr></sendmail:param
>
      </sendmail:attachment>
      <sendmail:attachment url="context://welcome.xml"
mime-type="text/plain" name="foo.txt"/>
      <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? 

Thanks

----- Original Message ----- 
From: jim basilakis 
To: [EMAIL PROTECTED] 
Sent: Wednesday, October 08, 2003 12:30 AM
Subject: RE: Sendmail attachment


Hi,

I have been using Cocoon 2.0.4 and I wanted to send e-mail attachments as
well. Looking at the coccon.jar file 
specifically for the sendmail.xsl logic sheet...there was no
<sendmail:attachment> taglib specified therefore
only text could be sent and no attachments, so I modified this logicsheet to
include this tag after reading
about the JavaMail API.

It is fairly easy to do and I can send this if you want.

Jim



-----Original Message-----
From: Josep Riudavets [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 7 October 2003 11:20 PM
To: [EMAIL PROTECTED]
Subject: Sendmail attachment


Hi...

I'm using sendmail taglibs ... and I want to attach a file placed into
"/usr/local/tomcat/webapps/cocoon/fitxers/CADi.pfd"

What the correct syntax for the <sendmail:attachment> taglib?

Thanks

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

Reply via email to