Hey! I currently have a for each loop that iterates over an array of emails. The emails get added to a Microsoft Teams channel.
If one of those emails doesn't get added correctly and throws an error, I would like to get a list of all the emails that don't work so I can manually deal with them. For example,
Array = ["email@mail.com", "bad-email@mail.com", "bad-email2@mail.com"].
For loop iterates over "email@mail.com", it works. For loop iterates over "bad-email@mail.com", it throws an error. For loop iterates over "bad-email2@mail.com", it throws an error.
What I want is to return the array ["bad-email@mail.com", "bad-email2@mail.com"]. This is so I can report it as an error message that those are the emails that need to be dealt with manually.

Report
All responses (
Answers (