BTW, I added your code because it makes sense anyway ;-) thx!
Norman Maurer schrieb: > Hi, > > For me it seems that the message is a multipart/alernative and missing > the "Content-Type: text/plain; charset=anychar". > If im not wrong this is not a valid mimemessage. I don't hat else we > could do with such messages. Maybe just use an "default" charset of > "iso-8859-1"? > > bye > Norman > GX GLIX schrieb: > >> 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] >>>>> >>>>> >>>>> >>>>> >>>> --------------------------------------------------------------------- >>>> 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/ >> >> >> >> >> ------------------------------------------------------------------------ >> >> Betreff: >> Undelivered Mail Returned to Sender >> Von: >> [EMAIL PROTECTED] (Mail Delivery System) >> Datum: >> Mon, 23 Apr 2007 14:30:24 +0300 (EEST) >> An: >> [EMAIL PROTECTED] >> >> An: >> [EMAIL PROTECTED] >> >> Return-path: >> <> >> X-Spam-Checker-Version: >> SpamAssassin 3.1.0 (2005-09-13) on NETQUEST.netquest.com.cy >> X-Spam-Level: >> *********** >> X-Spam-Status: >> No, score=11.7 required=20.0 tests=BAYES_99,HTML_90_100, >> HTML_MESSAGE,HTML_SHORT_LENGTH autolearn=disabled version=3.1.0 >> Authentication-Results: >> netquest.com.cy smtp.mail=; spf=neutral >> Authentication-Results: >> netquest.com.cy header.from=; domainkeys=neutral (not signed); >> dkim=neutral (not signed) >> X-MDDK-Result: >> neutral (netquest.com.cy) >> X-MDDKIM-Result: >> neutral (netquest.com.cy) >> X-MDSPF-Result: >> none (netquest.com.cy) >> Received-SPF: >> none (netquest.com.cy: does not designate permitted sender hosts) >> x-spf-client=MDaemon.PRO.v9.0.0 receiver=netquest.com.cy >> client-ip=195.14.130.226 envelope-from=<> helo=demokritos2.cytanet.com.cy >> Received: >> from demokritos2.cytanet.com.cy ([195.14.130.226]) by netquest.com.cy >> (netquest.com.cy [195.14.149.40]) (MDaemon PRO v9.0.0) with ESMTP id >> md50000532993.msg for <[EMAIL PROTECTED]>; Mon, 23 Apr 2007 >> 14:25:07 +0300 >> Received: >> by demokritos2.cytanet.com.cy (Postfix) id 9FB5C480F1; Mon, 23 Apr >> 2007 14:30:24 +0300 (EEST) >> Auto-Submitted: >> auto-replied >> MIME-Version: >> 1.0 >> Content-Type: >> multipart/report; report-type=delivery-status; >> boundary="6673E480EC.1177327824/demokritos2.cytanet.com.cy" >> Nachricht-ID: >> <[EMAIL PROTECTED]> >> X-MDRcpt-To: >> [EMAIL PROTECTED] >> X-Rcpt-To: >> [EMAIL PROTECTED] >> X-MDRemoteIP: >> 195.14.130.226 >> X-MDaemon-Deliver-To: >> [EMAIL PROTECTED] >> X-Spam-Processed: >> netquest.com.cy, Mon, 23 Apr 2007 14:25:07 +0300 >> X-MDAV-Processed: >> netquest.com.cy, Mon, 23 Apr 2007 14:25:11 +0300 >> Content-Transfer-Encoding: >> 7bit >> >> >> 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 >> >> >> !DSPAM:1,462c9cbf324321555613041! >> >> ------------------------------------------------------------------------ >> >> 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 >> >> >> ------------------------------------------------------------------------ >> >> Betreff: >> Von: >> "Buysell CRM test account acon" <[EMAIL PROTECTED]> >> Datum: >> Mon, 23 Apr 2007 14:24:37 +0300 >> An: >> [EMAIL PROTECTED] >> >> An: >> [EMAIL PROTECTED] >> >> X-Virus-Scanned: >> By virus scanner at Cytanet >> Received: >> from netquest.com.cy (mail.netquest.com.cy [195.14.149.40]) by >> demokritos2.cytanet.com.cy (Postfix) with ESMTP id 5979A480E9 for >> <[EMAIL PROTECTED]>; Mon, 23 Apr 2007 14:30:22 +0300 (EEST) >> Received: >> from WorldClient by netquest.com.cy (MDaemon PRO v9.0.0) with ESMTP id >> md50000532992.msg for <[EMAIL PROTECTED]>; Mon, 23 Apr 2007 >> 14:24:37 +0300 >> Received: >> from [91.184.194.210] by netquest.com.cy via WorldClient with HTTP; >> Mon, 23 Apr 2007 14:24:37 +0300 >> MIME-Version: >> 1.0 >> Content-Type: >> multipart/alternative; boundary="_0423-1424-37-PART-BREAK" >> Nachricht-ID: >> <[EMAIL PROTECTED]> >> X-Mailer: >> WorldClient 9.0.0 >> X-Authenticated-Sender: >> [EMAIL PROTECTED] >> X-Spam-Processed: >> netquest.com.cy, Mon, 23 Apr 2007 14:24:37 +0300 (not processed: >> message from valid local sender) >> X-MDRemoteIP: >> 127.0.0.1 >> X-Return-Path: >> [EMAIL PROTECTED] >> X-MDaemon-Deliver-To: >> [EMAIL PROTECTED] >> X-MDAV-Processed: >> netquest.com.cy, Mon, 23 Apr 2007 14:24:37 +0300 >> >> >> test >> >> >> !DSPAM:1,462c9cbf324321555613041! >> ------------------------------------------------------------------------ >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> !DSPAM:1,462c9cbf324321555613041! >> >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > !DSPAM:1,462c9f9c324323051214747! > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
