cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <thorsten.scher...@wyona.org>
Subject Re: Attachments within sendmail
Date Tue, 28 Jan 2003 21:49:38 GMT
You're right! But most of the time I was posting in regard of that:

http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=103803474424981&w=2
Bernhard Huber answered me:
So you may want to enhance the
src\java\org\apache\cocoon\components\language\markup\xsp\java\sendmail.xsl
for adding attachments, and provide it as patch.
As a hint you may have to study the javamail API for adding an 
attachment to the MimeMessage object

So now I think I have to do that:
In Java you have to do the following (according to 
http://www.developer.com/java/other/article.php/618471).
...
if(null == fields.get("attachment"))
msg.setText((String)fields.get("body"));
else
{
BodyPart body = new MimeBodyPart(),
attachment =
    (BodyPart)fields.get("attachment");
body.setText((String)fields.get("body"));
MimeMultipart multipart = new MimeMultipart();
multipart.addBodyPart(body);
multipart.addBodyPart(attachment);
msg.setContent(multipart);
...


Geoff Howard wrote:
> there were some messages on this a month or so ago.  Have you searched the
> archives for it for both the dev and users list?
> 
> Geoff Howard
> 
> 
>>-----Original Message-----
>>From: Scherler, Thorsten [mailto:Thorsten.Scherler@weidmueller.de]
>>Sent: Tuesday, January 28, 2003 12:04 PM
>>To: cocoon-dev@xml.apache.org
>>Subject: AW: Attachments within sendmail
>>
>>
>>Thanks for the reply.
>>
>>i thought nobody but me would like to have that capability.
>>
>>I am working on it (at the moment without any success).
>>
>>-----Ursprüngliche Nachricht-----
>>Von: Pier Fumagalli [mailto:pier@betaversion.org]
>>Gesendet: Dienstag, 28. Januar 2003 17:59
>>An: cocoon-dev@xml.apache.org
>>Betreff: Re: Attachments within sendmail
>>
>>
>>I'd like to have that capability (as I already use it on my employer's
>>site), but I'll need to get acquainted with that part of the code before
>>commenting on it... Maybe in a couple of weeks...
>>
>>    Pier
>>
>>"Scherler, Thorsten" <Thorsten.Scherler@weidmueller.de> wrote:
>>
>>>Am I the only one, who wants to attach files to sendmail?
>>>
>>>
>>>>Mit freundlichem Gruss,
>>>>
>>>>Thorsten Scherler
>>>>Marketing / Telefonmarketing
>>>>
>>>>Weidmüller GmbH & Co.
>>>>P.O. Box 2807
>>>>33058 Paderborn
>>>>Tel.:+ 49 - 5252-960-350
>>>>Fax:+ 49 - 5252-960-116
>>>>eMail: thorsten.scherler@weidmueller.de
>>>>http://www.weidmueller.de
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
>>For additional commands, email: cocoon-dev-help@xml.apache.org
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
>>For additional commands, email: cocoon-dev-help@xml.apache.org
>>
>>
>>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message