Move mail by use activity switch?

I want to move folder mail by subject mail as below.

If email subject mail contain Report daily ***** —>move mail to folder mail inbox/Report

If email subject mail contain Progress daily ***** —>move mail to folder mail inbox/daily

Please guide me about it.

1 Like

Hi

Here I would suggest to go with IF condition which is way more easier

Hope these steps would help you resolve this issue

—use get outlook mail activity and mention the TOP value as 100 and get the output as
out_mailmessages

—now use a FOR EACH activity and pass the above variable as input and change thr type argument as System.Net.Mail.MailMessage

—inside the loop use a IF condition like this

Item.Subject.ToString.Contains(“Progress daily”) OR Item.Subject.ToString.Contains(“Report daily”)

If true it goes to THEN Block where we can use MOVE OUTLOOK MAIL ACTIVITY in which mention the Mailmessage as item and mention the folder where we want to move

Cheers @fairymemay

@fairymemay

If you have only two conditions to satisfy then as per @Palaniyappan suggests use If condition

Else if you have different conditions then better to use Switch activity, In this case Switch properties-> TypeArguments should set as Boolean and write your statements

Hope this may help you

Thanks