"Loop" script for bulk emails

Discussion created by sherab4 on Mar 13, 2017
Latest reply on Mar 14, 2017 by coherentkris

I have asked this before, but I need more help. At the moment I have a script (see attached Email script.jpeg) that creates an email, attaches an Excel file ready to send. I want another script that does this but to multiple Contacts for their particular students. I am sure it needs to be a "Loop" script as the attachments to the emails are all different. I have tried a various combinations using the Loop but with no luck. I can get all the correct emails, but the attachment is always the same and not from the layout that I want, the attachment is from the Contacts file not the PrisonersVisitingTeacher file. I know the problem is with the syntax and the Loop commands but I don't know where to put these. One of the scripts I tried is attached (bulk email.jpeg).I added the Pause/Resume script (Indefinitely) because it gives the user a chance to edit the emails if they want, before they go to the next email. This all works how I want it to, but the attachment is the problem.