Moving Specific Mails to Bin/Trash folder using IMAP/Outlook

Great
So once after getting the mail list from Get Outlook or any other mail getting activity with a variable of type list of mailmessage named list_mails

Now use a FOR EACH loop and pass the above variable list_mails as input and change the type argument as System.Net.Mail.Mailmessage in the property panel of For each loop

—inside the loop use a IF condition like this
item.From.Address.ToString.Contains(“xyz@gmail.com”)
If true it will go to THEN part or goes to ELSE part where inside the THEN Part use MOVE mail activity either from Imap or from any service in which we can mention the folder ‘Deleted Items/Trash‘we want to move

Cheers @Saikat_Chowdhury

2 Likes