You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Alagan Sathianathan <AS...@ifmc.sdps.org> on 2004/04/05 18:16:05 UTC
James to manage the bounced emails
I am using James to hadnle the bounced emails. When ever there is a bounced mail from, it will be forwared to my James Server. I am running a thrad process to look at the bounced mails and forward the mails to some admin and delete the messages.
But I have problems in deleting the messages.Geting "javax.mail.MethodNotSupportedException: Expunge not supported
" . Here id the code:
//
public void process() {
try {
Message msgs[] = getMessages();
if( msgs != null){
log.info("Processing "+msgs.length+" Messages");
}
if (msgs != null)
for (int i = 0; i < msgs.length; i++) {
if (!wasProcessed(msgs[i])) {
msg[i].setFlag(Flags.Flag.DELETED, true); }
}
// Notify REPLYTO Address
// TODO to be implemented
// delete them from inbox HAVING PROBELM HERE
folder.expunge();
} catch (Exception e) {
// TODO: handle exception
log.warn("Exception thrown");
}
}
//
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org