6 Replies Latest reply on Jan 30, 2010 7:28 PM by casey777

    Embed Merge Field letter into Email



      Embed Merge Field letter into Email


      I am frustrated beyond belief!  I'm so close yet there is something I do not understand.  I've read hundreds of other folks posts and tried many options but I am still not able to get what I need.


      I am trying to email individual registrations to workers using FMP 10 on a Mac OS 10.  On a scale of 1 -10 with 10 being high I'm at a 7 competency level with FMP but a 4 competency level with scripts and calculations.


      I've created the letter I wish to send with merge fields and portal.  All is well there.


      In creating the script to embed it into an email I am having difficulty.  At one point I got the letter embedded into the email but the address would not autopopulate even though I had the correct table and field placed in the TO field.  This is the option I would prefer to use if it is possible but now I've even lost the script steps to embed the letter.  Argh!


      When I tried to create a pdf and send it via email the email creates properly with the correct address but the pdf does not create nor attach.


      What don't I understand?


        • 1. Re: Embed Merge Field letter into Email

          When you create a pdf letter, are you saving it to a file or your desktop? Once done, in your script step Send Email, you need to find it using the attach option. When running a Loop for the emails to be sent, you can create and save each pdf letter to the same location so that the replaced pdf file is attached to the next email sent as per the Send Mail script step.


          If the letter is plain text, there is no need to create a pdf file. You combine (concatenate) the various fields (date, name, body of letter, etc.) into one calculation field or in the Send Mail script step and send them. This way is may be better for you since many people do not like attachments.


          Steps: Do a Find, Go to first record, Loop through set including Send Mail step, End loop when finished.



          • 2. Re: Embed Merge Field letter into Email

            Hi TECman,

            Thanks so much for responding quickly!

            I was trying to save to desktop but that kept failing.


            Here's the code I was using that does not work.


            Go to First record


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

               Send Mail {Send via E-mail Client; No dialog; To: Worker::Email; Subject: "VNSA VNSA Worker Assignment for Feb 13 & 14"; Message; "test.pdf"]

               Go to Layout ["Email Placement Letter: (Workers)]

               Go to Record/Request/Page {Next;Exit after last0

            End Loop


            What this does is:

            Finds the correct workers to mail to, creates 1 letter on my desktop called "test.pdf" and sends 3 blank emails to the correct people.  (Subject line is correct, but body only says "test.pdf")



            • 3. Re: Embed Merge Field letter into Email
                 Oops...I just re-read the second half of your post which talks about the concantenation.  I don't know how to do that but my letter is all plain test.  At least I think so.  There are no images, but some text is formatted larger and in bold.  Does that preclude it from plain text?
              • 4. Re: Embed Merge Field letter into Email

                To answer your second question first, yes, larger font sizes and styles do not work in the body of the email whether it is typed in or as a concatenation of several fields such as:


                "Dear " & NameField & "¶¶Here is your assignment -¶¶" & AssignmentTextField .......(all of this example would be in plain text)



                To insert a form or layout inline in the email, you need to use a plug-in.



                You previous question about the attached pdf file. At the bottom of the Send Mail script step, there is a checkbox to include an attachment. It will give you a dialog box in which you need to locate the pdf file to be attached. I appears that you are incorrectly placing the pdf file name in the body text area. 



                • 5. Re: Embed Merge Field letter into Email
                     I'm using an iMac 8.1 with the 2.4 Intel dual processor.  Do you have a recommendation of a good plug in?
                  • 6. Re: Embed Merge Field letter into Email

                    A plug-in is a software extension for Filemaker Pro which allows some capabilities beyond that which Filemaker can already perform. Do a search in the Filemaker help menu for plug-ins and external functions, and on the internet for 360 Works and SMTPit Pro to get an idea about them. For now, you may want to format your emails without the use of plug-ins.