camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r823102 - /camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailBinding.java
Date Thu, 08 Oct 2009 09:46:15 GMT
Author: davsclaus
Date: Thu Oct  8 09:46:14 2009
New Revision: 823102

URL: http://svn.apache.org/viewvc?rev=823102&view=rev
Log:
CAMEL-2054: attachments using cid must use angle brackets in Content-ID according to RFC.

Modified:
    camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailBinding.java

Modified: camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailBinding.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailBinding.java?rev=823102&r1=823101&r2=823102&view=diff
==============================================================================
--- camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailBinding.java
(original)
+++ camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailBinding.java
Thu Oct  8 09:46:14 2009
@@ -338,7 +338,8 @@
                     
                     if (attachmentFilename.toLowerCase().startsWith("cid:")) {
                         // add a Content-ID header to the attachment
-                        messageBodyPart.addHeader("Content-ID", attachmentFilename.substring(4));
+                        // must use angle brackets according to RFC: http://www.ietf.org/rfc/rfc2392.txt
+                        messageBodyPart.addHeader("Content-ID", "<" + attachmentFilename.substring(4)
+ ">");
                     }
 
                     // Set the filename



Mime
View raw message