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:[EMAIL PROTECTED]] Sent: Tuesday, January 28, 2003 12:04 PM To: [EMAIL PROTECTED] 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:[EMAIL PROTECTED]] Gesendet: Dienstag, 28. Januar 2003 17:59 An: [EMAIL PROTECTED] 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" <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] http://www.weidmueller.de--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]