How to delete mail from server ( like hotmail account) ,if mail are deleted programatically from Mobile.


  • Hello All,

    I have implemented one component,which reads the mail from the inbox and process and delete.

    lst.cValues = 1;
    sbin.cb = EntryList.lpbin[count].cb;
    sbin.lpb = (LPBYTE)EntryList.lpbin[count].lpb;
    lst.lpbin = &sbin;
    hr = pfldrInbox->DeleteMessages(&lst, NULL, NULL, 0);

    Mail get deleted from inbox,But when next time mails are downloaded,all deleted mail also get downloaded on mobile.

    I have done setting on Mobile,to download the mail after 5 min.

    So can anyone help me for the setting required to delete from the server as well.


    09/رجب/1430 11:49 ص


  • Hi Sagar Mane,

    We can move the message to Deleted Items folder, the mail transport will detect this and take care of the server delete for you.

    For how to move a message to another foler, we can use IMAPIFolder::CopyMessage to copy it to destination folder, then use DeleteMessage to delete it in source folder.

    Best regards,
    Guang-Ming Bian - MSFT
    Please remember to mark the replies as answers if they help and unmark them if they provide no help
    15/رجب/1430 02:33 ص

جميع الردود