3 Replies Latest reply on Aug 27, 2009 8:12 AM by TSGal

    Email Scripts, help!

    camigarrison

      Title

      Email Scripts, help!

      Post

      Can anyone tell me how to create an email script that allows you to send an individual email with a unique attachment, such as an invoice, to recipients within a found set? 

       

      Thank you!

        • 1. Re: Email Scripts, help!
          TSGal

          camigarrison:

           

          Thank you for your post.

           

          Assuming the email address is in the field "EMAIL", and the attachment is named "Test.txt", the script step could be:

           

          Send Mail [ Send via E-Mail client ; No dialog ; To: EMAIL ; Subject: "File" ; Message: "Please read the enclosed invoice" ; "Test.txt" ]

           

          This is a simplistic case, and I assume the file name is going to change for each recipient.  Assuming the file name is placed into a field "INVOICE", a looping script would be:

           

          Go to Record/Request/Page [ First ]

          Loop

             Set Variable [ $filepath ; "file:" & INVOICE ] 

             Send Mail [ Send via E-Mail client ; No dialog ; To: EMAIL ; Subject: "File" ; Message: "Please read the enclosed invoice" ; $filepath ]

             Go to Record/Request/Page [ Next ; Exit after last ]

          End Loop

           

          This puts you at the first record of the found set.  For each record inside the loop, the name of the file is put into the variable $filepath, and then it is used in the Send Mail step.  The following step takes us to the next record and go back to the top of the loop.  If you are at the last record and you try to skip to the next record, the loop is exited.

           

          Let me know if you need clarification for any of the above steps.

           

          TSGal

          FileMaker, Inc. 

          • 2. Re: Email Scripts, help!
            camigarrison
              

            Thank you so much, I'll see if I can it out from this.  This might be beyond my skill level with FMP.  Do you have an email address I can contact you at? 

            • 3. Re: Email Scripts, help!
              TSGal

              camigarrison:

               

              You can always send me a private message - top of this page - right side - the envelope icon.

               

              TSGal

              FileMaker, Inc.