[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


Guest


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.
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


Guest


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 http://www.microsoft.com/downloads/details.aspx?FamilyID=E17E7F31-079A-43A9-BFF2-0A110307611E&displaylang=en.
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


Guest


Hello Peter,

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