How to mark a message as readed

+1 vote
asked Mar 1, 2010 by Juan Carlos Pazos 1 (190 points)
edited Mar 1, 2011


I think this is my last question, I'm using IMAP for list messages, retrive headers and extract some content for the mails, all this works perfect.

The last thing to do is marke the message as readed. I found code to copy the message to another folder and delete and purge, as I'm using Gmail account, I prefer only mark the message as read, it's important because I check only for new messages to extract information of them.

Using VB.Net

Thanks for your help.

Applies to: Rebex Secure Mail

2 Answers

0 votes
answered Mar 2, 2010 by Lukas Pokorny (128,250 points)
edited Mar 1, 2011
Best answer

Rebex IMAP marks messages as Seen (that's what read messages are called in IMAP) when you call GetMessage/GetMailMessage/GetMimeMessage, or GetMessageInfo/GetMessageList with ImapListFields.Body flag (this behavior can be switched off using ImapOptions.UsePeekForGetMessage).

If you need to mark messages as Seen without using one of these methods, use the SetMessageFlags method:

''# create client, connect and log in 
Dim client As New Imap
client.Login("username", "password")

''# select folder 

''# mark the first message in Inbox as "read":
client.SetMessageFlags(1, ImapFlagAction.Add, ImapMessageFlags.Seen)
0 votes
answered Nov 3, 2010 by zamani (140 points)
edited Nov 3, 2010

how know email read or unread with smpt or imap please helpe me