Thanks all for such a fast response.
attached is an example that should replicate the error.
file permissions etc are correct as binary attachments are saved fine and
other text attachments have worked fine.
Thanks for such a prompt response
GX
From: Niklas Therning <[EMAIL PROTECTED]>
Reply-To: "James Developers List" <[email protected]>
To: James Developers List <[email protected]>
Subject: Re: [mime4j] null charset error
Date: Mon, 23 Apr 2007 13:28:36 +0200
Yes, if possible please post the source of the message you are parsing.
That will help us fix the first problem.
Also, make sure you don't close() the OutputStream you are writing to
before your call to Message.writeTo().
/Niklas
Norman Maurer wrote:
> Can you show use the emailcontent ?
>
>
> bye
> Norman
>
> GX GLIX schrieb:
>
>> Hi All
>>
>> I am getting a "Null charset name" error during parsing, it seems that
>> getCharset(String charsetName) is passed an empty string... I tried
>> the following hack to fix it:
>>
>> ..........
>> public static java.nio.charset.Charset getCharset(String
>> charsetName) {
>> if(charsetName == null)
>> charsetName = "ISO8859-1";
>> java.nio.charset.Charset c =
>> java.nio.charset.Charset.forName(charsetName);
>> ............
>>
>> now the result is :
>>
>> java.io.IOException: Bad file descriptor
>> at java.io.FileOutputStream.writeBytes(Native Method)
>> at java.io.FileOutputStream.write(FileOutputStream.java:260)
>> at
>> sun.nio.cs.StreamEncoder$CharsetSE.writeBytes(StreamEncoder.java:336)
>> at
>>
sun.nio.cs.StreamEncoder$CharsetSE.implFlushBuffer(StreamEncoder.java:404)
>>
>> at
>> sun.nio.cs.StreamEncoder$CharsetSE.implFlush(StreamEncoder.java:408)
>> at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:152)
>> at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:213)
>> at java.io.BufferedWriter.flush(BufferedWriter.java:230)
>> at org.mime4j.message.Header.writeTo(Header.java:152)
>> at org.mime4j.message.BodyPart.writeTo(BodyPart.java:39)
>> at org.mime4j.message.Multipart.writeTo(Multipart.java:178)
>> at org.mime4j.message.Message.writeTo(Message.java:91)
>> any ideas anyone?
>>
>> _________________________________________________________________
>> FREE pop-up blocking with the new MSN Toolbar - get it now!
>> http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>> !DSPAM:1,462c94fb324321289648189!
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
Niklas Therning
www.spamdrain.net
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_________________________________________________________________
Don't just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/
--- Begin Message ---
This is the mail system at host demokritos2.cytanet.com.cy.
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to postmaster.
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The mail system
<[EMAIL PROTECTED]>: Host or domain name not found. Name service
error for name=angelos123test.com type=A: Host not found
Reporting-MTA: dns; demokritos2.cytanet.com.cy
X-Postfix-Queue-ID: 6673E480EC
X-Postfix-Sender: rfc822; [email protected]
Arrival-Date: Mon, 23 Apr 2007 14:30:24 +0300 (EEST)
Final-Recipient: rfc822; [email protected]
Original-Recipient: rfc822;[email protected]
Action: failed
Status: 5.4.4
Diagnostic-Code: X-Postfix; Host or domain name not found. Name service error
for name=angelos123test.com type=A: Host not found
--- Begin Message ---
test
--- End Message ---
--- End Message ---
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]