Windows Server - Move Item from Inbox to Draft or some temp folder, Change Status

Asked By LVP on 29-Apr-08 03:19 PM

Using Exchange 2007, WebServices

I would like to move an email item from the inbox to the draft folder or
some tempItem

I would like to change the status of an email item in the Inbox to like

I just can not find sample code.  The Programming Model is confusing...

any links or specific code to what I need is greatly appreciated.

Thank You,


Glen Scales [MVP] replied on 29-Apr-08 11:11 PM
You might want to have a look at
this moves mail from the inbox to a spam folder is the subject is prefix
with SPAM:

To change the status of an item you need to use an updateitem request
something simular to but you will
need to modify the PR_FLAG_STATUS 0x10900003 mapi property which controls
the Flags. You may also need to set the text that's associated with the flag
using the{00062008-0000-0000-C000-000000000046}/8530001E
named property.

There is a lot more information in the Exchange SDK on EWS which you can
download from you may also want to
consider buy a book such as which goes into a lot more

LVP replied on 30-Apr-08 11:29 AM

already figured out moving emails from inbox to deletedItems folder after
few ours of googleing.

Your link and code was  helpful in finding a user defined folder and not
only distinguished folders,  did not test yet to see how it works and if so.

Updating the contact link helps but sill I have many things to figure out on
how to update the status of an item ( email item ).
Not sure if the status of any item is stored on the server or just the
Like Mark email as "Read", "Completed" etc..

The following link does not work at all
Glen Scales [MVP] replied on 01-May-08 01:15 AM
That was a named property not a URL (they kind of look the same)
FollowupFlags and MessageFlags (Read Status ect) are two different
properties i suggest getting hold of a Mapi editor like Outlookspy or
MFCmapi and you can view all the Mapi properties yourself this is great tool
for doing development.

To mark a message Read you need to use something like

ExtendedPropertyType sfSentFlag = new ExtendedPropertyType();
PathToExtendedFieldType epExPath = new
epExPath.PropertyTag = "0x0E07";
epExPath.PropertyType = MapiPropertyTypeType.Integer;
sfSentFlag.ExtendedFieldURI = epExPath;
sfSentFlag.Item = "1";

LVP replied on 06-May-08 07:48 PM
Thank you Glen you been great help.