By default, 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 disabled using `UsePeekForGetMessage` option:
C#:
Imap client = new Imap();
client.Settings.UsePeekForGetMessage = true;
VB:
Dim client As New Imap()
client.Settings.UsePeekForGetMessage = True
If you are using one of the older versions of Rebex components, please use the old Options property like this:
C#:
client.Options |= ImapOptions.UsePeekForGetMessage;
VB.NET:
client.Options = client.Options Or ImapOptions.UsePeekForGetMessage
(where "client" is an instance of "Imap" object)