10 Replies Latest reply on Mar 5, 2010 2:07 PM by MarieT

    Emailing form letters from Filemaker 10

    tack_1

      Title

      Emailing form letters from Filemaker 10

      Post

      <!--  StartFragment  -->

      I work in a college, and one of our databases is for student records for our home town press releases. In the past we have mailed the releases, but this year I want to use email to send them to the individual student newspapers.

       

      This database has 29 layouts for each individual student. The last layout has the merge document for the release, and the first layer has the newspaper email addresses for each newspaper.

       

      Is there a way to email each individual student release to that students newspaper, and,if so, can anyone tell me how to do it? (For example John Doe want his release to go to his hometown newspaper in Des Moines, IA; while Mary Jane wants her release to go to her paper in Presque Isle, Maine.)

       

       

      Thank you<!--  EndFragment  -->

        • 1. Re: Emailing form letters from Filemaker 10
          TSGal

          tack:

           

          Thank you for your post.

           

          I'm having a little trouble with the semantics.  If the last layout has the merge document, this is probably what you want to use for emailing, am I correct?  FileMaker Pro will allow you to send an email and attach a document, so you may want to print this layout to a PDF file, and then attach the PDF file to the email message.

           

          Is the merge document on the layout?  Or, is it in a field?  If in a field, you can use the field name in the Body of the email.  Since each student has the email address of the home newspaper, this field can also be used in the "To:" portion of the email.

           

          To send the email, pull down the File menu and select "Send Mail..."  If you want to do all of this automatically, you can create a script that loops through the found set of records and sends out the email; either through your default email application or through a SMTP server.

           

          TSGal

          FileMaker, Inc. 

          • 2. Re: Emailing form letters from Filemaker 10
            tack_1
              

            <!--  StartFragment  -->Could you send me an example of a script that would loop through the found set of records, create the pdf, and then send out the email?

             

            Thanks. 

            • 3. Re: Emailing form letters from Filemaker 10
              TSGal

              tack:

               

              Here is a sample script that does as you ask:

               

              Go to Record/Request/Page [ First ]

              Loop

                 Save Records as PDF [ Restore ; No dialog ; "test.pdf" ; Current record ]

                 Send Mail [ Send via E-Mail Client ; No dialog ; To: <email field name> ; Subject: <subject matter> ; Message: <message information> ; "test.pdf" ]

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

              End Loop

               

              -------

               

              In essence, go to the first found record and enter the loop.  Save the current record to the PDF file "test.pdf".  Then, send a mail to the recipient and attach "test.pdf".  Then, skip to the next record and repeat.  When you reach the last record, you leave the loop.

               

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

               

              TSGal

              FileMaker, Inc.

              • 4. Re: Emailing form letters from Filemaker 10
                tack_1
                   Thank you. I'll try it later today and let you know how it works. Thank you again.
                • 5. Re: Emailing form letters from Filemaker 10
                  tack_1
                    

                  We wrote the script and it is not sending the emails. I also can't see a way to let Filemaker know which email client I am using. Any ideas?

                   

                  Thanks 

                  • 6. Re: Emailing form letters from Filemaker 10
                    TSGal

                    tack:

                     

                    For Mac OS X, launch Apple Mail (or email application of your choice), pull down the Mail menu and select "Preferences".  Click the "General" tab (if not already selected) and set the "Default email reader".

                     

                    For Windows, go into the Control Panel, click on "Set Program Access and Defaults" on the left side, select "Custom" and "Choose a default e-mail program".  Make sure you also check "Enable access to this program".

                     

                    Close the settings and relaunch FileMaker Pro.

                     

                    Pull down the File menu and select "Send Mail..." and send a sample email to yourself.  If this works, then try the script again.  If this doesn't work, does the Email application at least launch?

                     

                    TSGal

                    Filemaker, Inc.

                    • 7. Re: Emailing form letters from Filemaker 10
                      tack_1
                         It worked! Thank you.
                      • 8. Re: Emailing form letters from Filemaker 10
                        MarieT
                          

                        When I followed these steps it DID email me a message but the message body reads "test.pdf"

                        Was I suppose to put something else in the message portion for test.pdf

                         

                        I am using Mac OS 10 FMP10

                        I'm a beginner at calculations and scripting.

                        • 9. Re: Emailing form letters from Filemaker 10
                          TSGal

                          Slopearoonie:

                           

                          Thank you for your post.

                           

                          If the message body reads "test.pdf", then it sounds like you entered the name of the file in the Message area.  Instead, below the Message area, there is a checkbox to "Attach file".  Put a check mark next to "Attach file", and a dialog box will appear prompting you for a file.  Select the file and click OK.  Click OK again to send the message, and this time you will receive the file attachment.

                           

                          Please let me know if you run into any difficulty.

                           

                          TSGal

                          FileMaker, Inc.

                          • 10. Re: Emailing form letters from Filemaker 10
                            MarieT

                            Thanks so much.  You are very kind to take the time to help a beginner.

                            mtk