This project is read-only.

set mail to unread mail

Oct 12, 2012 at 10:08 AM

 I don't understand how to make mail status to unread.

Please help me

Oct 15, 2012 at 12:51 PM

At first, see this post.

Pop3 does not have read state management, but Imap has it.
Which protocol do you use?

Oct 15, 2012 at 1:04 PM
Edited Oct 15, 2012 at 1:13 PM

I use imap protol and I saw this sample. 

My code:

Dim list As SearchResult = cl.ExecuteSearch("UNSEEN UNDELETED")

For i As Integer = 0 To list.MailIndexList.Count - 1     
  Dim mg = cl.GetMessage(list.MailIndexList(i))    

All OK, but function GetMessage set read status to True, but I want to leave the status as is("unseen" at this sample).

Oct 15, 2012 at 1:19 PM

Please try ExecuteStore method.

cl.ExecuteStore(mailIndex, StoreItem.FlagsRemove, "UNSEEN");


Oct 15, 2012 at 2:50 PM


Thank you very much for idea!!!

cl.ExecuteStore(mailIndex, StoreItem.FlagsRemove, "UNSEEN");  - doesn't work

but cl.ExecuteStore(mailIndex, StoreItem.FlagsReplace, "UNSEEN") -  work  :))))))))))))))))))))))))))

Oct 16, 2012 at 12:57 AM

Thank you for your feed back.
I'll add this information about read state to document wiki.