Closed ShadmanAfzal closed 2 years ago
How to permanently delete a message sequence using IMAP
Mark the messages as deleted and then expunge.
await _imapClient.store(sequence, [MessageFlags.deleted], action: StoreAction.add, silent: true);
await _imapClient.expunge();
MailClient
has now the optional expunge boolean parameter:Future<DeleteResult> deleteMessages( MessageSequence sequence, {bool expunge = false})