how to save message to draft message, and edit draft message?
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   nelson_tu
Posted On:   Thursday, August 2, 2001 01:25 AM

my code is: try { if (msgnum>messageCount || msgnum <=0) throw new MailException(labels.getString("1025")); Message msg=m_folder.getMessage(msgnum); Multipart mp = (Multipart) msg.getContent(); if (partnum <0 || partnum>mp.getCount()) throw new MailException(labels.getString("1028")); mp.removeBodyPart(partnum); // here may be wrong msg.setContent(mp); msg.setSentDate(new java.util.Date()); msg.saveChanges(); } catch (Exception ex) { throw new MailException(ex.getMessage()); } it has exception: IMAPMessage is read-only what can i do ? please help me ! thank   More>>

my code is:

try {
if (msgnum>messageCount || msgnum <=0)
throw new MailException(labels.getString("1025"));

Message msg=m_folder.getMessage(msgnum);
Multipart mp = (Multipart) msg.getContent();

if (partnum <0 || partnum>mp.getCount())
throw new MailException(labels.getString("1028"));

mp.removeBodyPart(partnum); // here may be wrong
msg.setContent(mp);
msg.setSentDate(new java.util.Date());
msg.saveChanges();
} catch (Exception ex) {
throw new MailException(ex.getMessage());
}

it has exception:
IMAPMessage is read-only

what can i do ?
please help me ! thanks.

   <<Less
About | Sitemap | Contact