I may be wrong here since I don't know exactly what you are doing, but if you get an InputStream from the message, that consists of raw bytes which have to be decoded. There is a system property, file.encoding which controls the default encoding used on your system. There is also a javamail property that kicks in for this, I forget what it is but it can be found in the javax.mail documentation.

In this case I would rather recommend you to control the decoding yourself, looking at the content-type header for the encoding and using the java.nio Decoders.

/tobe

Jose Andres Perez wrote:

Hi,

I want to read the mail content I received in my mailet. I run it in James 2.2.0. The mail content I receive from outside is UTF-8, but when I try to read mail data I do not get the original. For example, if the original mail has the following format

FROM: [EMAIL PROTECTED]
TO: [EMAIL PROTECTED]
SUBJECT: ρρ ??
BODY: ρρ ??

I get the following:

FROM: [EMAIL PROTECTED]
TO: [EMAIL PROTECTED]
MAIL CONTENT-TYPE: text/plain; charset=UTF-8; format=flowed
SUBJECT: ρρ ??
BODY: ?? ??

Do you know how could I read the subject and body geting the original text? Do you know if this is a bug of James 2.2.0 version?

Cheers,
Jose



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to