This project is read-only.

Setting Flags

Oct 25, 2013 at 1:43 PM
Hi Pavel.

Congratulations! It is a great work!

I need some help with a question: how set flag in this new release?

Example: In the previous release, I use:
Mensagem.AddFlag(ImapX.ImapFlags.DELETED)
How I do this now?

Thanks.
Coordinator
Oct 25, 2013 at 5:57 PM
Hi geddy_bob,

thank you! For the flag management there has been some change, I introduced the class MessageFlagCollection which is directly manipulating flags on the server:
using ImapX.Flags;

// ..

message.Flags.Add(MessageFlags.Deleted);
message.Flags.Remove(MessageFlags.Deleted);

// MessageFlagCollection.AddRange/RemoveRange also available
Another change is that if you like to mark/unmark a message as SEEN, you can simply set the Message.Seen property to true/false:
message.Seen = true;
Hope this helps,

Greets,

Pavel
Oct 25, 2013 at 6:30 PM
Works perfectly...

Thanks.