Search code examples
outlook-redemption

RDOMail.Delete 2 throws MAPI_E_UNKNOW FLAG with outlook 2007


The title says it all,

I have an issue with redemption using outlook 2007 with exchange 2010

 var deleteItem = folderItems[i];
 deleteItem.Delete(2); // Flag = HardDelete

The exact same line works with outlook 2010, is this a known issue or maybe there's something wrong?

PS: I'm deleting the mail straight from the ost file, exchange connection mode = olOnline


Solution

  • dfHardDelete is Exchange specific that only works in the online mode. Why not use the default dfSoftDelete (0)?