Return-Path: Delivered-To: apmail-camel-dev-archive@www.apache.org Received: (qmail 56213 invoked from network); 8 Oct 2009 09:52:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Oct 2009 09:52:26 -0000 Received: (qmail 99978 invoked by uid 500); 8 Oct 2009 09:52:26 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 99948 invoked by uid 500); 8 Oct 2009 09:52:26 -0000 Mailing-List: contact dev-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list dev@camel.apache.org Received: (qmail 99736 invoked by uid 500); 8 Oct 2009 09:52:26 -0000 Delivered-To: apmail-activemq-camel-dev@activemq.apache.org Received: (qmail 99720 invoked by uid 99); 8 Oct 2009 09:52:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Oct 2009 09:52:26 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Oct 2009 09:52:14 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id CA7DC234C48C for ; Thu, 8 Oct 2009 02:51:52 -0700 (PDT) Message-ID: <1068191335.1254995512827.JavaMail.jira@brutus> Date: Thu, 8 Oct 2009 02:51:52 -0700 (PDT) From: "Claus Ibsen (JIRA)" To: camel-dev@activemq.apache.org Subject: [jira] Assigned: (CAMEL-2054) Mail Component: Content-ID reference in multipart broken In-Reply-To: <257439180.1254961313512.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: ae95407df07c98740808b2ef9da0087c X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/CAMEL-2054?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Claus Ibsen reassigned CAMEL-2054: ---------------------------------- Assignee: Claus Ibsen > Mail Component: Content-ID reference in multipart broken > -------------------------------------------------------- > > Key: CAMEL-2054 > URL: https://issues.apache.org/activemq/browse/CAMEL-2054 > Project: Apache Camel > Issue Type: Bug > Components: camel-mail > Affects Versions: 1.6.1, 1.6.2, 2.0.0 > Environment: Email clients like gmail, zimbra. Outlook 2003 works > Reporter: slad > Assignee: Claus Ibsen > Fix For: 1.6.2, 2.1.0 > > > It looks like Camel Mail Component does not set Content-ID mime header correctly or probably assumption is that BodyPart will take care of it. As a result embedded images in html body do not work ( img src="cid:somename.img"). > Currently Content-ID is set as - > //MailBinding.java > // add a Content-ID header to the attachment > messageBodyPart.addHeader("Content-ID", attachmentFilename.substring(4)); > But according to RFC standards [http://www.ietf.org/rfc/rfc2392.txt], Content-ID value should be enclosed with in angle brackets, so it should be modified to - > //MailBinding.java > // add a Content-ID header to the attachment > messageBodyPart.addHeader("Content-ID", "<" + attachmentFilename.substring(4) + ">"); > Also, below should be modified which incorrectly sets fileName inclusive of "cid:", but expectation would be strip off "cid" off it, similar to Content-ID > // Set the filename > messageBodyPart.setFileName(attachmentFilename); > Should be - > // Set the filename > messageBodyPart.setFileName(attachmentFilename.substring(4)); > Also, RFC standard mentions that Content-ID should be globally unique but Camel Mail just sets it to filename instead. I understand this can be problematic as camel will have to replace references to each of such cid's in any of the mail parts. > As I understand from RFC document, is that this is required in case you send emails itself attachments, and attachments can same name can trample each other(I may be wrong here). I guess we can live with this for a while :) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.