As far as I can find there is no property on a MailItem one can access to discover if a MailItem is a draft.
One could check MailItem.Categories and see if it includes Drafts but this seems insufficient because:
Drafts don't have to be stored in the Drafts folder, they can be dragged and dropped into other folders.
The fact that a draft email retains its draftyness even if moved out of the Drafts folder indicates there must be some other way in which a MailItem is marked as a draft, but I haven't been able to find it.
Suggestions?
New items don't have the
EntryIDproperty set. The value is assigned by the store provider when an item is saved to the store.If the item is already saved to the store you can use the
PR_MESSAGE_FLAGSproperty value which contains a bitmask of flags that indicate the origin and current state of a message.Try to check for the MSGFLAG_UNSENT value which stands for the following:
See PidTagMessageFlags Canonical Property for more information about possible values.