You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mime4j-dev@james.apache.org by "Oleg Kalnichevski (Resolved) (JIRA)" <mi...@james.apache.org> on 2011/10/04 01:16:33 UTC

[jira] [Resolved] (MIME4J-205) Missing MIME-Version Header

     [ https://issues.apache.org/jira/browse/MIME4J-205?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Kalnichevski resolved MIME4J-205.
--------------------------------------

    Resolution: Fixed

Fixed in SVN trunk.

Oleg
                
> 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
>             Fix For: 0.7.1
>
>
> 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