79076977

Date: 2024-10-11 06:11:30
Score: 1
Natty:
Report link

Get the trash folder:

var trashFolder = imapClient.GetFolder(SpecialFolder.Trash);

Copy message to trash (do not move message, move may not work using MailKit):

inboxFolder.CopyTo(uid, trashFolder); //copy the message to trash

Then delete the original messages after it is copied:

inboxFolder.AddFlags(uids, MessageFlags.Deleted, true); //mark them as deleted

Reasons:
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Wasiqul Islam