03-09-2010 04:16 AM
hi..........
please help me to solve this problem...
is it possible to delete mails both in handheld and account programmatically ?
and i want to know about <$removeondelivery>.........
please guide me regarding this
thanks
03-09-2010 04:23 AM
this depends on the sync settings of the user. usually a mail deleted on the handheld is also deleted on the account (exchange/notes)
03-09-2010 04:32 AM
can we programmatically delete mails on both ends ??
this is the code am using to delete mails
but its deleting only on handheld not on account
Store store=null;
try {
store = Session.waitForDefaultSession().getStore();
} catch (NoSuchServiceException e) {
System.out.println(e.toString());
}
Folder[] folders = store.list(Folder.SENT);
Folder sentfolder = folders[0];
Message msg[] = null;
try {
msg=sentfolder.getMessages();
} catch (MessagingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
int count =msg.length;
for(int j=0;j<count;j++)
{
Message m=msg[j];
String str=m.getSubject();
if(str.startsWith("C"))
{
sentfolder.deleteMessage(m,true);
}
}
03-09-2010 04:41 AM
works on my device. as i said, depends on your sync settings.
05-25-2010 03:01 AM
Hello simon_hain,
Will you please explain sync settings in detail? I have deleted the email from handheld. But I want to delete it from mail box also. How should I proceed?
Thank you
05-25-2010 03:08 AM
mail options e-mail-synchronization
05-25-2010 03:16 AM
Hello simon_hain,
I found option of (delete on--Mailbox & handheld) in Email Reconciliation.
But not able to find the sync option. Will you please tell me where the option is?
Thank you
05-25-2010 03:30 AM
the option you found is the correct one, i mistranslated my (german) menu entry
05-25-2010 03:47 AM
Hello simon_hain,
Thank you for your reply
I will try this and let you know what happens ![]()
Thanks and regards