From mime4j-dev-return-1708-apmail-james-mime4j-dev-archive=james.apache.org@james.apache.org Sat Oct 1 22:44:57 2011 Return-Path: X-Original-To: apmail-james-mime4j-dev-archive@minotaur.apache.org Delivered-To: apmail-james-mime4j-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5FF3B9A49 for ; Sat, 1 Oct 2011 22:44:57 +0000 (UTC) Received: (qmail 26790 invoked by uid 500); 1 Oct 2011 22:44:56 -0000 Delivered-To: apmail-james-mime4j-dev-archive@james.apache.org Received: (qmail 26741 invoked by uid 500); 1 Oct 2011 22:44:56 -0000 Mailing-List: contact mime4j-dev-help@james.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mime4j-dev@james.apache.org Delivered-To: mailing list mime4j-dev@james.apache.org Received: (qmail 26727 invoked by uid 99); 1 Oct 2011 22:44:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Oct 2011 22:44:56 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Oct 2011 22:44:55 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id E0EFD2A4293 for ; Sat, 1 Oct 2011 22:44:33 +0000 (UTC) Date: Sat, 1 Oct 2011 22:44:33 +0000 (UTC) From: "Robert Lee (Created) (JIRA)" To: mime4j-dev@james.apache.org Message-ID: <1499449256.763.1317509073923.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Created] (MIME4J-205) Missing MIME-Version Header MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Missing MIME-Version Header --------------------------- Key: MIME4J-205 URL: https://issues.apache.org/jira/browse/MIME4J-205 Project: JAMES Mime4j Issue Type: Bug Components: dom Affects Versions: 0.7 Environment: Java 1.5, Windows 7, 64-bit Reporter: Robert Lee Priority: Minor When creating a "multipart/mixed" message using the DOM API, no "MIME-Version" header is added to the message, as is required by RFC 2045 (MIME 1.0) Section 4 for all MIME messages. This bug even manifests itself with the "MultipartMessage" sample class that Mime4j 0.7 ships with. Run the example exactly as it exists in the source release and observe that the generated message does not comply with RFC-2045 (MIME 1.0). The missing header is causing multipart messages generated by mime4j to be parsed incorrectly by several strict email clients including the "c-client" PHP extension (used by earlier versions of Horde Groupware, etc...). The example can be fixed by adding the line (after the setSubject call): {noformat} message.getHeader().addField(DefaultFieldParser.parse("MIME-Version: 1.0")); {noformat} ...but I would recommend that this header be added automatically by MessageImpl's constructor for all messages since all messages generated by Mime4j are indeed MIME 1.0 messages. This solution would also address the minor annoyance of MessageImpl's getHeader() method returning null in certain circumstances. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira