Quantcast
Channel: ImapX 2
Viewing all articles
Browse latest Browse all 1952

New Post: messaje.Seen = true isn't working properly :S

$
0
0
Hi!
First, congrats for the lib, is really easy to use and get results very fast!,
but I'm experience some problems while marking messages as read.
I'm connecting to a zimbra mail server (version 8) with success, also i can download attachments, but the when i fetch "UNSEEN" messages and using Seen property the first time aren't marked at all, but a second time fetching the same mail it correctly marks as seen, so i'm a bit confused with this.

My code:
 Folder folderInbox = clienteCorreoImap.Folders.Inbox;
                    folderInbox.Messages.Download("UNSEEN", ImapX.Enums.MessageFetchMode.Tiny);
                    foreach (Message msj in folderInbox.Messages) {
foreach (Attachment adjunto in msj.Attachments)
                        {
adjunto.Download();
//saving the file, then i apply some custom processing

//finally i try to mark the message as read
msj.Seen = true;
}
}
i also tried with
msj.Seen = true;
msj.Flags.Add(ImapX.Flags.MessageFlags.Seen);
msj.Flags.Remove("UNSEEN");
With the same results: only the second time fetching and processing the UNSEEN mails they got correctly marked as seen.
I could use NEW or RECENT to fetch mails, but i need to keep track of mails which aren't correctly downloaded and processed its attachments (ie, keep them as unread/unseen), so that's why I'm using the UNSEEN tag.
If you could help me to enlight what I'm doing wrong here would be greatly appreciated

Thanks! And keep the good work!

Viewing all articles
Browse latest Browse all 1952

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>