james-mime4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthias Huttar (Updated) (JIRA)" <mime4j-...@james.apache.org>
Subject [jira] [Updated] (MIME4J-214) Writing Multipart Mails with DefaultMessageWriter can produce unreadable mails
Date Fri, 16 Mar 2012 09:09:39 GMT

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

Matthias Huttar updated MIME4J-214:
-----------------------------------

    Attachment: ContentTransferEncodingMime4JExposer.java
                MimeMessageWriter.java

Sorry for not granting ASF license. Gotta check with my employer, if granting the license
is fine for him. If so, I'll attach the files again with granting the license. 
                
> Writing Multipart Mails with DefaultMessageWriter can produce unreadable mails
> ------------------------------------------------------------------------------
>
>                 Key: MIME4J-214
>                 URL: https://issues.apache.org/jira/browse/MIME4J-214
>             Project: JAMES Mime4j
>          Issue Type: Bug
>          Components: dom
>    Affects Versions: 0.7, 0.7.2
>         Environment: any, provable via Unit Test
>            Reporter: Matthias Huttar
>         Attachments: ContentTransferEncodingMime4JExposer.java, MimeMessageWriter.java
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> I've figured out, that the DefaultMessageWriter's content-transfer-encoding is a bit
too naive on handling multipart mails: If the mail headers define a content-transfer encoding,
the complete Multipart entity is encoded using content-transfer-encoding. This, tough, may
lead to unparseable mails: 
> - Mail headers in parts of the multipart will get encoded. e.g. {{Content-Type: text/plain;
charset=3Diso-8859-1}}
> - Multipart boundaries will get escaped. e.g. with quoted-printable and Content-Type:
{{multipart/mixed; boundary="=SIMPLEBOUNDARY="}}, will get encoded to =3DSIMPLEBOUNDARY=3D.
Which then cannot be parsed by major mail clients (Outlook, Thunderbird, some web mail clients,
as we've heard from some users). Mime4J BTW also is not able to parse that generated mail
correctly.  
> - We've heard from various sorts of weird issues with mails from our users, relating
this bug. (e.g. attachments get lost, charset is broken, mails are empty, entire mail body
is viewed as plaintext (showing the HTML source),...). However, I could not quite reproduce
all of those things with a unit test. 
> Below you can find a unit test exposing the issue and a solution proposal. Unfortunately,
this proposal does not implement the MessageWriter interface, as doing the content-transfer-encoding
right, required a serious amount of state to be transferred. I could not get this to work
right retaining the interface. 
> Unit test and bugfix for message writer is attached. 

--
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

        

Mime
View raw message