I've written a bounce back email system for our company (using javamail), and some messages are arriving encoded in UTF-7 variants.
It's eating my lunch. I stumbled across what appears to be a totally cool OpenSource product - JCharset (http://www.freeutils.net/source/jcharset/), which, it would seem, would solve this. Several posts on the internet indicate people have indeed copied the jar into their apps and it works fine (most using Coldfusion). Problem is, mine is not working. Every time the mail processor encounters a UTF-7 email, it throws an exception. I've added jcharset.jar to my CLASSPATH variable. I've copied the jcharset.jar file into {jboss}/server/default/lib, {jboss}/lib, and even into WEB-INF of my application. Restarting the server after every change. No change in behavior. Running: Mac OSX 10.4.4 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-83) Javamail 1.4ea JAF 1.1ea JCharset 1.2.1 Here's an exception example: | 16:44:09,927 ERROR [BouncedMailJob] Unknown encoding type: null | java.io.UnsupportedEncodingException: unicode-1-1-utf-7 | at sun.io.Converters.getConverterClass(Converters.java:218) | at sun.io.Converters.newConverter(Converters.java:251) | at sun.io.ByteToCharConverter.getConverter(ByteToCharConverter.java:68) | at sun.nio.cs.StreamDecoder$ConverterSD.<init>(StreamDecoder.java:224) | at sun.nio.cs.StreamDecoder$ConverterSD.<init>(StreamDecoder.java:210) | at sun.nio.cs.StreamDecoder.forInputStreamReader(StreamDecoder.java:77) | at java.io.InputStreamReader.<init>(InputStreamReader.java:83) | at com.sun.mail.handlers.text_plain.getContent(text_plain.java:82) | at javax.activation.DataSourceDataContentHandler.getContent(DataHandler.java:767) | at javax.activation.DataHandler.getContent(DataHandler.java:519) | at javax.mail.internet.MimeBodyPart.getContent(MimeBodyPart.java:618) | at com.imc.quartz.jobs.BouncedMailJob.dumpPart(BouncedMailJob.java:571) | at com.imc.quartz.jobs.BouncedMailJob.dumpPart(BouncedMailJob.java:628) | at com.imc.quartz.jobs.BouncedMailJob.execute(BouncedMailJob.java:260) | at org.quartz.core.JobRunShell.run(JobRunShell.java:195) | at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520) | Has anyone run across this before? Or have any ideas? I'm stumped. Thanks View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3917019#3917019 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3917019 ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ JBoss-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jboss-user
