[MAPI Store Accessor] Mark email item as read

Add-in Express™ Support Service
That's what is more important than anything else

[MAPI Store Accessor] Mark email item as read
 
Peter Speybrouck




Posts: 5
Joined: 2008-07-15
I am using MAPI Store Accessor to read an exchange email account.

I started from this example: http://www.codeproject.com/KB/IP/mapiaccessor.aspx (visual studio 2005)

And converted that successfully to somthing that responds to new emails by getting the attachments and save them to the local disk for further processing.

This all works fine and I found the "Microsoft Exchange Server MAPI Editor" to be of great help with this but the one thing I couldn't get working is to mark an email as read or unread.

I noticed that the PR_MESSAGE_FLAGS property of an item (email) contains the flag MSGFLAG_READ (=0x1) after it is marked read, but it appears that you can not set this property.
Setting it returns 0 but the value does not change and email is still unread.

Is there another (maybe less obvious) property that I can set to mark an item as read?
Posted 15 Jul, 2008 12:15:18 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hello Peter,

This is a bug. It must return a non-zero result. MAPI doesn't allow to change message flags. Thank you for pointing me to this.

I don't know another properties which you can use instead.
.NET, Extended MAPI, Windows Phone & RT
Posted 15 Jul, 2008 13:31:07 Top
Peter Speybrouck




Posts: 5
Joined: 2008-07-15
ah, too bad :(

It's not a disaster, just would have made it more finished 8)


On a side note, dou you need outlook/office installed for this to work? I have office on my development PC, but it's supposed to run on some server.
Posted 15 Jul, 2008 18:53:41 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hello Peter,

You should have Microsoft Outlook installed on a client PC.

Do you plan to use Exchange server?

If yes, you can use the following package.
.NET, Extended MAPI, Windows Phone & RT
Posted 16 Jul, 2008 09:25:28 Top
Peter Speybrouck




Posts: 5
Joined: 2008-07-15
The application will run on a server without outlook and will contact an Exchange server.

In fact I'm not even sure if I can install .Net 2.0 on the server.

Perhaps there is another solution to do this in .net 1.1 without outlook?
Posted 16 Jul, 2008 09:44:19 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hello Peter,

No, you should have both .NET Framework 2.0 & Outlook installed.
.NET, Extended MAPI, Windows Phone & RT
Posted 16 Jul, 2008 09:50:13 Top