6 Replies Latest reply on Sep 23, 2014 11:32 PM by AndrewStJ

    Attaching multiple files to an SMTP email message

    ghoffman

      Working in FMPro 13 using a file hosted on an FMSA 12 at the moment, I'm designing an email script that is supposed to send up to four attachments to a recipient.

      No matter what I try, I only get the first file listed inthe File Path List of the "Send Mail" option script step.

      I checked this also with FMPro 12 and the effect is the same.

       

      The Specify File window in the Send Mail option (under Attach file--Specify) says,

      Click Add File to add one or more files to the path list, or type the file paths directly into the list.

      Specify one file path per line. Filemaker will search for the file in the order the paths appear in the list.

       

      Am I to understand that we can only attach one file to a message and that Filemaker will send the first one it finds?

       

      I want to read this as, Filemaker will attach files in the order of the File Path List.

       

      What is it really spposed to do? How can I make it attach a series of files?

       

      Gary

        • 1. Re: Attaching multiple files to an SMTP email message
          steveromig

           

          Am I to understand that we can only attach one file to a message and that Filemaker will send the first one it finds?

           

          I want to read this as, Filemaker will attach files in the order of the File Path List.

           

          What is it really spposed to do? How can I make it attach a series of files?

           

          Gary

           

          Your interpretation is correct.  The Send Mail script step only supports attaching one file.  A possible workaround is to compress multiple files into one "ZIP" file and then attaching the compressed file to your e-mail.

           

          This issue is documented in the knowledge base here...

           

          http://help.filemaker.com/app/answers/detail/a_id/323

           

          Steve Romig

          FileMaker, Inc.

          • 2. Re: Attaching multiple files to an SMTP email message
            PalmDBS

            What platform are you on, and what method of sending are you using?  There may be other options available, such as using Applescript to attach multiple documents, etc.

            • 3. Re: Attaching multiple files to an SMTP email message
              Mike Duncan

              The multiple file paths work the same way that external file references do. The first match that is found in the list gets used, but only one. It can be a little confusing in this context for adding attachments to emails.

               

              There are workarounds and plugins available to do what you want, though.

              • 4. Re: Attaching multiple files to an SMTP email message
                GordonShewach

                In addition to the options stated above, if you're dealing with PDF files, you can consider creating one PDF, then appending additional PDFs to the original. You'll just be sending a single file, but it will contain multiple documents joined together.

                • 5. Re: Attaching multiple files to an SMTP email message
                  ghoffman

                  Thanks for clarifying. Despite the "one or more files" file list wording, the behavior is as Mike noted: The first match found on the list gets used.

                   

                  I have already moved to a third-party plug-in which works great.

                   

                  Yes, I could have bundled up the PDFs into one, but that's not what my customer wants to do.

                   

                  Thanks for being a great resource.

                   

                  Gary

                  • 6. Re: Attaching multiple files to an SMTP email message
                    AndrewStJ

                    Hi All,

                     

                    I have had a similar problem.

                     

                    I append multiple layouts to one PDF using script variables, save to PDF and then send completed pdf as a single email attachment.

                    This works a charm on the PC (FM13/Win 7) but on iPad (FMG13/iOS7) I only get the last appended layout and as discussion above demonstrates attaching multiple files doesn’t work. (not my preference anyway!)

                    This is a standalone iPad app not hosted. (Not good coverage at 42,000 feet!!)

                     

                    Does the iOS need some different treatment? All my scrip steps are in the iOS compatible list.

                     

                    As an aside during testing when i did have a hosted version running on iPad some very strange results, no emails sent and no error messages!!

                     

                    Andrew