How to check for bounced emails

I have a scenario where in one assign activity I will be having emailIDs
Eg:-abc@gmail.com;efg@gmail.com
I need to iterate through this assign activity count may vary 2-6
search in un-read mails
I need to check the subject whether it is undelivered or not
if all the emails id subject if I have as undelivered then I need to assign email status as fail
if not I have to update email status as success how to do this using microsoft 365 activities

@Yoichi @Anil_G @ppr any help on this pls

Create an array of emails and pass them in the account input.
In my query i’m using - “contains(body/content, ‘rejected’) OR contains(body/content, ‘Delivery has failed’) OR contains(body/content, ‘not be delivered’) OR contains(body/content, ‘t be delivered’)”

I need mark as email status failed only when both email id bunced if foe one email id email delivered i dont want to update email status.

Will this logic works??