I upgraded MailKit from v2.x and now the AddFlags() method doesn't seem to exist? #1646
-
Hi, I was using an old Version Mail and MimeKit now I switched from Windows to Linux an used the newest version to install. The AddFlags seems to work diffrent now? The marked messages as seen is working on my Windows System. The delete message part I was also trying to add instead of mark the messages as seen, but this also never worked for me. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @Stephan-4711, A lot of API changes were made in MailKit v3.0 to combat the explosion of ImapFolder overloads that were being added in order to support additional IMAP extensions that MailKit was being updated to support. In v2.x for example, MailKit had the following AddFlags() method overloads:
It was just getting way too out of hand for me to maintain, so for v3.0, I made all of those into extensions methods located in To resolve the problem you are hitting, there are 2 options:
BTW, to reduce network traffic, you can set both the Seen and Deleted flags in a single AddFlags or Store request. You don't need to make 2 calls. The MessageFlags enum is a set of |
Beta Was this translation helpful? Give feedback.
Hi @Stephan-4711,
A lot of API changes were made in MailKit v3.0 to combat the explosion of ImapFolder overloads that were being added in order to support additional IMAP extensions that MailKit was being updated to support.
In v2.x for example, MailKit had the following AddFlags() method overloads:
AddFlags(int index, MessageFlags flags, bool silent, CancellationToken cancellationToken)
AddFlags(UniqueId uid, MessageFlags flags, bool silent, CancellationToken cancellationToken)
AddFlags(IList<int> indexes, MessageFlags flags, bool silent, CancellationToken cancellationToken)
AddFlags(IList<UniqueId> uid, MessageFlags flags, bool silent, CancellationToken cancellationToken)
AddFlags(int …