IMAPInputStream instead of Multipart when handling MIME message

Hi all,

I'm creating standalone java application, which read e-mails from exchange server using IMAP protocol.

I have a problem with handling MIME Multipart messages. My message is type of "multipart/alternative", but content is IMAPInputStream instead of Multipart object and I don't know why.

if (message.isMimeType("multipart/alternative")){

System.out.println(message.getContent().getClass()

}

and i get >>> class com.sun.mail.imap.IMAPInputStream

I found only 1 advice - to have a mail.jar before activation.jar in classpath, but this didn't help. {I'm using latest jars}

Thanks for any answer.

Regards,

djuri

[806 byte] By [djuri@ska] at [2007-11-27 5:26:47]
# 1

Are you using the mail.jar file unmodified? You didn't build your own version, right?

Possibly there's a problem with the class loader in the environment you're running in.

Try setting the System property "javax.activation.debug" to "true". The debug output

on System.out might help debug the problem.

bshannona at 2007-7-12 14:47:53 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2
bshannon, thanks a lot for your reply, you've solved my problem.Problem was with loading .mailcap file from mail.jar, so I made a copy of this one into HOME directory and it's work now.Regards,Juraj
djuri@ska at 2007-7-12 14:47:53 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3

If it wasn't being loaded from the mail.jar file, something else is

broken in your environment. You might want to look for the root

cause and fix it before it causes other problems.

Note that there are other configuration files that are read from

mail.jar, and not all of them can be copied to your home directory.

bshannona at 2007-7-12 14:47:53 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 4
To avoid double posting can you look at my post in this topic? http://forum.java.sun.com/thread.jspa?messageID=9697816&#9697816
zparticlea at 2007-7-12 14:47:53 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...