6 Replies Latest reply on Aug 15, 2011 12:50 PM by Tbear

    "Send Email" script step question

    Tbear

      Title

      "Send Email" script step question

      Post

      I have a new script that Save As PDF each event registration invoice and also emials the invoice to each customer by attaching the Saved As PDF invoice to the automatically generated email.

      My question: Is there a way to attach a second document to that same email?

        • 1. Re: "Send Email" script step question
          casey777

          Tbear, Filemaker does not provide a way to attach a 2nd pdf file to an email. You can send two emails, use a plug-in to add that capability, or expand your layout of information before saving it as a pdf file. 

          • 2. Re: "Send Email" script step question
            philmodjunk

            There is another option. Save AS PDF in your script as the option to append the new PDF to an existing file. Thus, you can use Save As PDF to generate the first PDF, then Save As PDF with the append option to append the second PDF to the same file. This gives you one file to attach to your email. The appended PDF will start on a new page.

            • 3. Re: "Send Email" script step question
              Tbear

              I was just wondering about that yesterday as a matter of fact but the problem is that there is a different Info doc for each seperate event. The scripted email body is generic to cover all events but the Info doc must be unique due to stuff like location and date etc. 

              I am betting there's probably a way to handle that too (even as new events continue getting booked) but I'm feeling lucky to have finally understood how to finish this script that Saves & Sends. 

              This morning I figured out how to make another improvement tweak but in doing that I spent an hour or more just figuring out why I couldn't use a "Date" field in my $EventInvoice file name in the script - that led me to use Substitute() (changing "/" to "-") for the first time. At this point each victory is a call for celebration!

              • 4. Re: "Send Email" script step question
                rjlevesque

                TBear, That is awesome! I love to hear someone get excited about the power of Filemaker.

                • 5. Re: "Send Email" script step question
                  philmodjunk

                  but the problem is that there is a different Info doc for each seperate event

                  That info should then be in a different record or group of records in each case. Your script can select the appropriate layout and record(s) then do a save as PDF to generate the PDF. That way you can set up a different PDF each time it sends an email.

                  • 6. Re: "Send Email" script step question
                    Tbear

                    Hm-m-m, I'll have to mull that one over. The event specific Info docs are a special Word doc that I use for other purposes as well such as promotions work. They aren't in my Filemaker solution file. I suppose it would not be that difficult to add a new layout to serve as an Info Doc since all the changable info is already in the EVENT table - I never thought of that. The Info Doc has a LOT of generic text however and is about 3 pages long so I'm not sure - I have not tried to do anything like that yet.