users@jax-rpc.java.net

problem with attachments

From: Sam <bytecode_at_Phreaker.net>
Date: Fri, 26 Jul 2002 23:47:34 -0400

I m trying to manipulate an attachement in via a handler.

// other code
message.removeAllAttachments();
message.saveChanges();
attach = message.createAttachmentPart();
byte[] data=// something here
attach.setContent(data, "application/octet-stream");
message.addAttachmentPart(attach);
message.saveChanges();


Why does this code fail at the setContent part ?? Why cant I just
change the content of the attachment with the new bytes ??

It keeps giving me data content handler/mime type errors...

Any work arounds ??

/s