What's this then? "IMAPBodyPart is read-only"

I am doing an S/MIME EDI thingy, and I experience differences between IMAP an POP.

When I invoke getContent() on a part to create a SignedMultipart (s/mime class), I get an IOException saying "IMAPBodyPart is read-only".

This only happens with IMAP ofcourse, but I get no error at all when using POP.

In both cases the folder is opened READ_WRITE.

I don't get this.

Can anyone help me?

[430 byte] By [baxel] at [2007-9-26 1:48:20]
# 1

which getContent() method are you referring to?

There are 2 getContent() methods available from the JavaMail API (1) javax.mail or (2) javax.mail.Internet.

The getContent() method of javax.mail handles multipart contents and always returns a Multipart subclass.

HTH. Post any further questions if still in doubt.

Allen Lai

SUN Developer Technical Support

allenlai at 2007-6-29 2:48:29 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...