You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by "Scherler, Thorsten" <Th...@weidmueller.de> on 2003/01/28 14:41:54 UTC

Struggling with add Multipart/formdata to sendmailAction

Hello group, hello Donald,

On the 1.6.2002 Donald finshed work on the SendmailAction.java / sendmail.xsl.

I would like to extend the functionality in regards of attaching (1 to n) files to a message. 
I want to call it with this tag <sendmail:attachment>file or URI</sendmail:attachment>. I am a newbie as a developer.

I found that site http://www.developer.com/java/other/article.php/618471. 
I think it is what I like to do. But where I have to add the MimiMultipart to (the .java or the .xsl).
...
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);
...

I tried the Ziegler/Langham way (Cocoon: building XML Application) p. 288 ff (Mail Component) but without suggest.

I am looking for some hints! 

Please help me!

> 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