Hi

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.

asked 01 Mar '10, 20:29

Juan%20Carlos%20Pazos%201's gravatar image

Juan Carlos ...
383
accept rate: 0%


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.Connect("imap.example.org")
client.Login("username", "password")

''# select folder 
client.SelectFolder("Inbox")

''# mark the first message in Inbox as "read":
client.SetMessageFlags(1, ImapFlagAction.Add, ImapMessageFlags.Seen)
link

answered 02 Mar '10, 11:51

Lukas%20Pokorny's gravatar image

Lukas Pokorny ♦♦
2.2k18
accept rate: 32%

edited 01 Mar '11, 17:13

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

link

answered 03 Nov '10, 13:30

zamani's gravatar image

zamani
16
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×71
×19

Asked: 01 Mar '10, 20:29

Seen: 696 times

Last updated: 01 Mar '11, 17:13