2 Replies Latest reply on Nov 12, 2008 12:52 PM by michael@ling.org

    Automatic File Attachment

    michael@ling.org

      Title

      Automatic File Attachment

      Post

      Using Filemaker Pro 9

       

      When sending an email via Filemaker how do you attach a variable file to the email?

        • 1. Re: Automatic File Attachment
          Orlando
            

          Hi MichaleJ

           

          Do you store the path to the file you with to attach in the same record or a related record?

           

          If so you will need to set a variable [$FilePath] to the value of the field, or if not the file path you want to attach to the record, and then specify that variable in the Send Email scritp step by selecting 'Attach File' and specifying the name of the variable [$FilePath].

           

          If you are doing this for multiple records you will also need to loop through each record setting this individually. It would look something like this

           

          #

           Go to Layout [List]

           Go to Record/Request/Page [First] 

           Loop 

            #Create and Send Report 1 

            Set Variable [$FilePath; FilePathField] 

            Send Mail [To:"email@domain.com"; "$FilePath"] 

            #

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

           End Loop 

           # 

           

          I hope this makes sence 

          • 2. Re: Automatic File Attachment
            michael@ling.org
              

            Thank you for the solution.

             

            It would not work for a local variable [$FilePath] even though the two lines followed each other in the script.

             

            It did however work if i set the variable to global [$$FilePath]

             

            It does not make sense, but it works.

             

            Thank you.