"for each" loop exits when sendmail fails
I am sending email to a subset of records satisfying a condition. The problem is that occasionally a record has an invalid email addresses and the "for each" loop exits in this case. This is a problem because everyone in my records needs to get that message. How do I make "for each" continue to the next record without exiting?
for each X in Registrar [SEND_EMAIL == 2]
{
sendmail
(
To : X.Email_Address
From : zoho.adminuserid
Subject : "Estás invitado a participar en un Experimento"
Message : "Querido " + X.First_Name + " " + X.Last_Name + ",.. blah.. blah
)
}