Iterating through records and sending email message to distinct email values

Iterating through records and sending email message to distinct email values

Hi,

I am trying to iterate through records based on a criteria and that will give me multiple records.
However, I only want to send email the the email value once if the email is repeated in the records.

This script will email the same user multiple times.
Please advise.
OutstandingRFA = Request_for_Approval[ConsultationStatus == "Pending" && ApprovalStatus != "Approved"];
for each  RFA in OutstandingRFA
{
UserEmail = master_data.System.getUserEmailFromID(RFA.Prepared_by);
Level1Email = master_data.System.getUserEmailFromID(RFA.Consulted_with);
sendmail
[
from :UserEmail
to :Level1Email
subject :"Reminder: RFA form number has been submitted for your verification"
message :"Dear Sir/Mdm, " + "<br>RFA Form number: " + RFA.Request_Form_Number + " requires your approval. +"<br> Thank you"
]
}