Return-Path:
Delivered-To: apmail-cocoon-cvs-archive@www.apache.org
Received: (qmail 35819 invoked from network); 17 Aug 2004 08:05:13 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199)
by minotaur-2.apache.org with SMTP; 17 Aug 2004 08:05:13 -0000
Received: (qmail 21845 invoked by uid 500); 17 Aug 2004 08:05:11 -0000
Delivered-To: apmail-cocoon-cvs-archive@cocoon.apache.org
Received: (qmail 21787 invoked by uid 500); 17 Aug 2004 08:05:10 -0000
Mailing-List: contact cvs-help@cocoon.apache.org; run by ezmlm
Precedence: bulk
Reply-To: dev@cocoon.apache.org
list-help:
list-unsubscribe:
list-post:
Delivered-To: mailing list cvs@cocoon.apache.org
Received: (qmail 21769 invoked by uid 99); 17 Aug 2004 08:05:10 -0000
X-ASF-Spam-Status: No, hits=-2.8 required=10.0
tests=ALL_TRUSTED,NO_REAL_NAME
X-Spam-Check-By: apache.org
Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194)
by apache.org (qpsmtpd/0.27.1) with SMTP; Tue, 17 Aug 2004 01:05:07 -0700
Received: (qmail 35633 invoked by uid 65534); 17 Aug 2004 08:05:02 -0000
Date: 17 Aug 2004 08:05:02 -0000
Message-ID: <20040817080502.35630.qmail@minotaur.apache.org>
From: cziegeler@apache.org
To: cvs@cocoon.apache.org
Subject: svn commit: rev 36509 - in cocoon/trunk: .
src/blocks/mail/java/org/apache/cocoon/mail/transformation
src/blocks/repository/java/org/apache/cocoon/components/source/impl
X-Virus-Checked: Checked
X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N
Author: cziegeler
Date: Tue Aug 17 01:04:59 2004
New Revision: 36509
Removed:
cocoon/trunk/src/blocks/repository/java/org/apache/cocoon/components/source/impl/MultiSourceValidity.java
Modified:
cocoon/trunk/src/blocks/mail/java/org/apache/cocoon/mail/transformation/SendMailTransformer.java
cocoon/trunk/status.xml
Log:
Mail block: Add ability to specify mime-type for email body text parameter in the mail transformer.
Modified: cocoon/trunk/src/blocks/mail/java/org/apache/cocoon/mail/transformation/SendMailTransformer.java
==============================================================================
--- cocoon/trunk/src/blocks/mail/java/org/apache/cocoon/mail/transformation/SendMailTransformer.java (original)
+++ cocoon/trunk/src/blocks/mail/java/org/apache/cocoon/mail/transformation/SendMailTransformer.java Tue Aug 17 01:04:59 2004
@@ -170,7 +170,7 @@
*
*
* @author Peter Klassen
- * @version CVS $Id: SendMailTransformer.java,v 1.15 2004/07/22 23:21:56 joerg Exp $
+ * @version CVS $Id$
*
*/
public class SendMailTransformer extends AbstractSAXTransformer {
@@ -191,7 +191,9 @@
public static final String ELEMENT_ERROR = "error";
public static final String ELEMENT_SUCCESS = "success";
public static final String ELEMENT_FAILURE = "failure";
- public static final String ELEMENT_RESULT = "result";
+ public static final String ELEMENT_RESULT = "result";
+
+ public static final String DEFAULT_BODY_MIMETYPE = "text/html";
/*
* mode-constants
@@ -225,6 +227,7 @@
protected String subject;
protected String body;
protected String bodyURI;
+ protected String bodyMimeType;
protected String mailHost;
protected String fromAddress;
protected AttachmentDescriptor attachmentDescriptor;
@@ -306,11 +309,18 @@
this.mode = MODE_SUBJECT;
} else if (name.equals(ELEMENT_MAILBODY)) {
String strBody = attr.getValue("src");
-
+
if (strBody != null) {
this.bodyURI = strBody;
}
-
+
+ String mType = attr.getValue("mime-type");
+ if (mType != null) {
+ this.bodyMimeType = new String(mType);
+ } else {
+ this.bodyMimeType = DEFAULT_BODY_MIMETYPE;
+ }
+
this.startTextRecording();
this.mode = MODE_BODY;
} else if (name.equals(ELEMENT_ATTACHMENT)) {
@@ -527,9 +537,9 @@
inStr.read(byteArr);
String mailBody = new String(byteArr);
- messageBodyPart.setContent(mailBody, "text/html");
+ messageBodyPart.setContent(mailBody, this.bodyMimeType);
} else {
- messageBodyPart.setContent(this.body, "text/html");
+ messageBodyPart.setContent(this.body.toString(), this.bodyMimeType);
}
Multipart multipart = new MimeMultipart();
Modified: cocoon/trunk/status.xml
==============================================================================
--- cocoon/trunk/status.xml (original)
+++ cocoon/trunk/status.xml Tue Aug 17 01:04:59 2004
@@ -204,6 +204,12 @@
+
+ Mail block: Add ability to specify mime-type for email body text parameter in the mail transformer.
+
+
+ Fix potential memory leaks in CForms/Woody Template Transformer and JXTemplateGenerator.
+
XMLDB Block: Add ability to delete collections with XMLDBTransformer.