4 Replies Latest reply on Mar 12, 2017 4:24 AM by PeterWindle

    Creating bulk emails

    sherab4

      At the moment I have a script (see attached) 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. Am I correct in assuming this would be done with a Loop command, and if so how do I write the script. Any help here would be greatly appreciated.

        • 1. Re: Creating bulk emails
          keywords

          If you run the script from the context of a found set of records, you can configure the Send Mail step to send the same email to each record in the set.

          Screen Shot 2017-03-12 at 10.02.47 PM.png

          • 2. Re: Creating bulk emails
            PeterWindle

            It is possible to have a single send mail script step to send to multiple email addresses, take a look at the options within the send mail command... however, the attachment will be the same to all recipients. Also, a lot of email spam filters may not allow this sort of thing.

             

            A loop is always a better option, since it means that if you need to stop the send mail process at any time, you can. Also, within a loop, you can change the attachment for each email that is being sent, if required.

            • 3. Re: Creating bulk emails
              sherab4

              Yes this is what I am after. Can you please give me an example of a Loop script. Do I need to make many changes to the script I attached previously.

              • 4. Re: Creating bulk emails
                PeterWindle

                FileMaker help provides an example of a loop script.

                 

                FileMaker Pro 15 Help

                 

                Note that you are going to related records before the export, so the "Prisoners Visiting Teacher" table would probably need to be navigated through one by one, then go to the related records, then go back to the parent, go to the related records, then export, then go back to parent, go to the next record and so on.. until the last record.