6 Replies Latest reply on Jan 14, 2013 1:03 AM by JürgenSchwarzbach

    email - attachment - container - server based path

    JürgenSchwarzbach

      Hi,

       

      I try to send emails via smtp with attachment.

      The source of the attachment is the content (reference to a pdf-file) of an containerfield - sored where the fm-server is hosted.

      Using SMTP for emailing i have to specify the path to the attachment in a variable.

      But this doesn't work. The attachment is only added, if I store it lokal via export of the fieldcontent.

      Anyone solved this problem?

       

      Thanks

      Jürgen

        • 1. Re: email - attachment - container - server based path
          BruceHerbach

          Jürgen,

           

          I believe that this is the way it has to work.  My suggestion is to have your script export the field contents to a file in the temp folder by using the get(temporarypath) function.  This way the file pdf will be automaticly deleted when the user logs off.  By that time the e-mail should be sent and the file in the temp folder will no longer be required.  I would suggest trying this out and verify that it works to your satisfaction.

           

          HTH

          Bruce

          • 2. Re: email - attachment - container - server based path
            JürgenSchwarzbach

            Hi Bruce,

             

            many thanks for your answer.

             

            Yes, you are right, your suggestion is just the way it works actually. But I am looking for a way not using exporting the field to any folder on the users side. I am looking for a way, specifying the server-path by any $_variable and to use this $_variable at SMTP to specify the path for the attachment. Even if I fill the $_varable with the correct path, I checked the path on the FileMakerServer, it doesn't work. So I am daubty, if I did erverthing correct or FileMaker and SMTP are not providing this possibility. If this would work, I (we) could avoid a lot of datatransfer.

             

            Have a nice rest-weekend

            Jürgen

            • 3. Re: email - attachment - container - server based path
              BruceHerbach

              HI,

               

              I don't think that the FileMaker client has direct access to the folder/share on the server when runing on the client. I can se where this could lead to file/field locking issues and other problems.   I would suggest sticking with the export field contents method.

               

              Best of luck with your project

              Bruce

              • 4. Re: email - attachment - container - server based path
                wimdecorte

                The Send Mail script can take a path but it must be accessible from each client if you want to use it from those clients.  That means that if you want to point it to where it stored on FMS or another server you have to share that location, give all the users read privileges to it (no more than read) and it has to be accessible to all in exactly the same fashion (no mapped folders unless each workstation uses the same mapping,..).

                 

                Sharing anything on a FMS machine is fraud with danger as it can lead to either the live files or the backups being accessible through a share.  And in general there are a lot of moving parts to make this work just right.

                In most circumstances the network traffic penalty is much smaller than the potential penatly of a bad / exposed deployment.

                • 5. Re: email - attachment - container - server based path
                  JürgenSchwarzbach

                  Hi Bruce,

                   

                  thank you! See the answer of wimdecorte! It seems to work but under very special security problems. So I will discuss this matter with my hosting provider and the client.

                   

                  Good luck
                  Jürgen

                  • 6. Re: email - attachment - container - server based path
                    JürgenSchwarzbach

                    Hi wimdwcorte,

                     

                    thanks a lot.
                    i will discuss this with my hosting provider and the client.

                     

                    Good luck
                    Jürgen