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

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

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,

LVP




Glen Scales [MVP] replied on 29-Apr-08 11:11 PM
You might want to have a look at
http://groups.google.com.au/group/microsoft.public.exchange.development/browse_thread/thread/b31bda50451a770c/df5a3c2d6fb5313a
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
http://msdn.microsoft.com/en-us/library/aa493909(EXCHG.80).aspx 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
http://schemas.microsoft.com/mapi/id/{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 https://msdn.microsoft.com/exchange you may also want to
consider buy a book such as
http://www.microsoft.com/MSPress/books/10724.aspx which goes into a lot more
detail.

Rgds
Glen
LVP replied on 30-Apr-08 11:29 AM
Glen,

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
client.
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
PathToExtendedFieldType();
epExPath.PropertyTag = "0x0E07";
epExPath.PropertyType = MapiPropertyTypeType.Integer;
sfSentFlag.ExtendedFieldURI = epExPath;
sfSentFlag.Item = "1";

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

LVP