How to Compare the message id stored in string with office365mailmessages list and want forward the mail

I tried with for each activity by looping mail messages and compare the message id with currentmail message id, it works but for 1 message id i need to loop all mails in folder, it will not work live project, kindly help us

@Ganesh_Kumar_M1,

Use Get Email By ID Activity to get that email by id instead of looping and comparing.

Thanks,
Ashok :slightly_smiling_face:

@Ganesh_Kumar_M1

Welcome to the community

there is a message id field in get mail which can be used

Apart from that you can use linq

listmails.Where(function(x) x.ID.equals("TheIDYouNeed"))(0)

cheers