I would like to send email notification to users based on the query result.My query retrieves the as attached. Now from here, I would like to send email to PM with all his/her team member detail in the email. For ex. For PM1 the email should go in the below way (for project PRJ0001) Project Code: PRJ0001 Project Name: XYZ Resource Name and Resource id: Res1 / R01; Res2/ R02 Again if PM1 is assigned for another project (for project PRJ0004) then the second email should go in the below way with all its details Project Code: PRJ0004 Project Name: AAA Resource Name and Resource id: Res5 / R05; Res6/ R06 So onâ€¦â€¦ I have already created the script to fetch the query result. However, I am unable to build the logic for the sending the email notification. The problem I am getting is that my script is sending other team member details to the PM. So in the above ex. PM1 receiving RES5 and RES6 details also in the first email i.e. the second email content. I know it require loops however I am unable to get the desired result.Can you please help on this?