Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6456444
Votes 0
Synopsis MimeMessages created from stream are not correctly handled with allow8bitmime
Category java_mail:smtp
Reported Against
Release Fixed 1.4.1
State 11-Closed, Unverified, bug
Priority: 4-Low
Related Bugs
Submit Date 02-AUG-2006
Description
FULL PRODUCT VERSION :
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
 customer  Windows XP [Versione 5.1.2600]

A DESCRIPTION OF THE PROBLEM :
1) MimeMessage created from an Input stream:
---------------
Content-Type: text/plain; charset=iso-8859-15
Content-Transfer-Encoding: quoted-printable
  Subject: test

Body=80
--------------
2) allow8bitmime true
3) remote server support ESMTP 8BITMIME

SMTPTransport alter the message using the convertTo8bit, but it does not work with the message being created from stream.

Here is the result:
------------
MIME-Version: 1.0
Content-Type: text/plain; charset=Cp1252
Content-Transfer-Encoding: 8bit

Body=80
---------------

It changed the Content-Transfer-Encoding to 8bit but did not update the content.


REPRODUCIBILITY :
This bug can be reproduced always.
Posted Date : 2006-08-02 19:14:42.0
Work Around
N/A
Evaluation
The current support for 8BITMIME is pretty much a hack.  It requires the
message to be modified by the SMTP protocol driver before it is sent.
Modifying messages that are read from a stream is problematic.  To make
this work, the message parts will be modified as necessary and
Message.saveChanges will be called, which will update the Message-ID.
Since the message has changed, in formatting if not in abstract content,
this seems appropriate, but it might surprise some applications.

A better approach might be to communicate the capabilities of the output
device (in this case, the SMTP server) to the code that chooses the
encoding so that it can choose an appropriate encoding the first time.
Posted Date : 2006-08-02 19:25:22.0
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang