5 Replies Latest reply on Jun 5, 2013 1:53 AM by Ragupathi

    How to send the Image via email automatic from Filemaker

    Ragupathi

      Hi i just want send the images via email automatically from filemaker. and i just stored the images in container and the images name is 1.jpg ,2.jpg,3.jpg,4.jpg, 5.jpg,6.jpg........n.jpg......

      And how i want to send an email means in 1st mail it should go 1.jpg and 2nd email it should go 2.jpg and in 3rd email it should go 3.jpg .

      but it should go automatically

      can any one guide me to write automatic Script

       

       

      Thanks & Regards

      Ragupathi

        • 1. Re: How to send the Image via email automatic from Filemaker
          mikebeargie

          something like this would work:

           

          Go To Record - First

          Loop

              Set Variable: $path = "file:" & get(temporaryPath) & get(recordNumber) & ".jpg"

              Export Field Contents, container field - to $path

              Send Mail - $path is attachment location, all other settings up to you

              Go To Record - Next - exit after last

          End Loop

           

          The above would go through your found set of records, and fire off a single email for every record in your found set, numbering from 1.jpg and increasing incrementally on each iteration.

          • 3. Re: How to send the Image via email automatic from Filemaker
            Ragupathi

            Dear Mike

                             This script is send an email till first record to last record at one short. But i don't want to send at one short

             

            Hi I just developed for HR Database for company. Once current date is equal to employee date of birth then automatic email will send to employee Birth day wishes with Greetings images..... for that i just created two table first table it will contain (Employee name , Employee Id , date of birth, ...... etc ) and second table will contain ( S.no(automatic serial no ), Image(Container ) )

             

            Now what i what is i want to write script from the server to send an email to current birthday employee and one more think the image should change automatic example : 1st email as been sent with image 1 and 2nd email should go with 2nd image only

             

            for example :In 1st table i stored 900 Employee details and In 2nd table i just stored only 200 images (records). After 200 records again started from 1st image (record)

             

            now i want write the script to excute in filemaker 12 Server. I need to Export Field Container but this options is not working in sever for that what i want do

            • 4. Re: How to send the Image via email automatic from Filemaker
              mikebeargie

              I'd seriously suggest that you look into finding a consultant to help you out on this. Without accessing your file and the language barrier, I'm limited in my understanding of your needs.

               

              I think this is what you're looking for, note that $i stands for "iteration", and you are resetting the iteration after each 200 times through the loop.

               

              Go To Record - First

              Loop

                  Set Variable: $i = if ( $i > 200 ; 1 ; $i + 1)

                  Set Variable: $path = "file:" & get(temporaryPath) & $i & ".jpg"

                  Export Field Contents, container field - to $path

                  Send Mail - $path is attachment location, all other settings up to you

                  Go To Record - Next - exit after last

              End Loop

              • 5. Re: How to send the Image via email automatic from Filemaker
                Ragupathi

                Thanks for your help......

                And Sure that i will do it