9 Replies Latest reply on Apr 23, 2010 1:03 PM by JFFortier

    email issue in Filemaker server for adding attachments when sending using the FM Server SMTP

    SteveDevney

      Title

      email issue in Filemaker server for adding attachments when sending using the FM Server SMTP

      Your post

      Trouble adding attachment to email, when sending using filemaker server 10.

       

      I am trying to send a file to people using filemaker server, but I'm having issues getting the file to attach. 

       

      Server is located at: fmnet:/192.168.203.10/test file.

       

      the file is located at: filewin://scpdc/steved$/Documents/test.txt 

      I also have use:       filewin://scpdc/users/steved/test.txt

      It gave a error message: There is a problem with one of the file paths in the list. Please correct the syntax of the highlighted item and try again, when I used:           fmnet:/scpdc/users/steved/test.txt 

       

      The Server is under a permission set that has full access I'm told, so I don't think that should be a problem.

       

      We are looking for the attachment in a user documents folder.  

       

      If someone else has talked about this problem, I'm sorry because I must have missed it.  

       

      I'm certain it is something simple I'm missing, but can not find it. Any help is greatly appreciated.  

        • 1. Re: email issue in Filemaker server for adding attachments when sending using the FM Server SMTP
          TSGal

          SwensonCommodities:

           

          Thank you for your post.

           

          First of all, make sure the volume is loaded on the client desktop.  Second, use the entire path name.  If the logged in volume shows user names, then they will need to be specified.  Using your example:

           

          filewin://scpdc/steved$/Documents/test.txt

          When you open the scpdc volume, it is looking in the steved$ folder, then the Documents folder, and then test.txt

           

          filewin://scpdc/users/steved/test.txt

          When you open the scpdc volume, it is looking in the users folder, then the steved folder, and then test.txt

           

          Both of the above are entirely different, so you'll need to determine which one is correct.

           

          TSGal

          Filemaker, Inc.

          • 2. Re: email issue in Filemaker server for adding attachments when sending using the FM Server SMTP
            SteveDevney
              

            First off, Sorry, I see I added Documents to one of the lists of file paths.

             

            Also, I must not have been clear about how I'm trying to get the email to send. I'm trying to send the email using filemaker server, as a schedule not on a client computer. It works fine on a client computer, but when I use server it does not attach the file.

             

            Does it still matter if the client computer can load the file, if we are sending the file through the email from the server?

             

             

            Thank you,

             

            Steve 

             

            Hopefully that clears things up :)  

            • 3. Re: email issue in Filemaker server for adding attachments when sending using the FM Server SMTP
              TSGal

              SwensonCommondities:

               

              Thank you for the additional information, but I am still a little confused.

               

              Are you trying to have the server execute a script via a schedule?  If so, then any attachments must be located on the server in either the Documents folder or Temp folder.  Please see Knowledge Base Article #7035:

               

              http://filemaker.custhelp.com/cgi-bin/filemaker.cfg/php/enduser/std_adp.php?p_faqid=7035

               

              Although the Knowledge Base article describes Import/Export, it also applies to Send Mail attachments.

               

              If the client is trying to attach a file that is on a server, then my previous post is correct.  That is, make sure the client has the server mounted prior to running the script.  Otherwise, the server will not be found, and there will be no attachment.

               

              TSGal

              FileMaker, Inc.

              • 4. Re: email issue in Filemaker server for adding attachments when sending using the FM Server SMTP
                SteveDevney

                We must not be explaining it properly yet.

                 

                Article #7035 we looked at, but did not find it to help our situation.

                 

                To help find our problem, we are now trying to export a file using the server on a running scheduled script.

                 

                When we use the path

                 

                file:test4.12.csv

                 

                to export a file using the script step: EXPORT RECORDS, no file is created. The thought is that this would create a file test4.12.csv either in the documents folder as mentioned in article 7035, or in the temp. folder. The server is set up in such a way that there is no 1 my documents folder though. The mydocuments are maped to a drive on the server for each person at the company. That causes many different mydocuments folders to exist, but no specific mydocuments folder exists for the filemaker admin account.

                 

                 We received three different error codes: 4,    102,   800. Our thought is error code 800 would be most relevant.

                 

                Thanks for your help

                Steve

                 

                • 5. Re: email issue in Filemaker server for adding attachments when sending using the FM Server SMTP
                  philmodjunk

                  Server side scripts are extremely limited. Quoting from the knowledgebase article 7035:

                   

                  FileMaker Server can only import from and Export to the following locations:

                  • When using the Import Records script step or Export Records script step in a FileMaker Server scheduled script, keep the following in mind:
                  • Any specified file must be in the Documents folder, the temporary folder, or a child folder of either the Documents folder or the temporary folder.

                  For example, the following are all valid paths for file.csv:

                  <Documents>/file.csv
                  <Temporary Path>/file.csv
                  <Documents>/Folder1/file.csv
                  <Temporary Path>/Folder1/Folder2/Folder3/Folder4/file.csv

                   

                  Note that ":test4.12.csv" doesn't fit any of the above options.



                  • 6. Re: email issue in Filemaker server for adding attachments when sending using the FM Server SMTP
                    SteveDevney

                    I thank you for the advice PhilModJunk.

                     

                    My Question then switches to how do I find the correct Documents folder, or temporary folder?

                     

                     

                    Also, am I correct that one of these should work?

                     

                    file:Tempory Path/test4.12.csv
                    file:Documents/test4.12.csv
                    file:My Documents/test4.12.csv

                     

                     

                    Thank you,

                    Steve

                     

                    P.S. Sorry for my complete ignorance.

                    • 7. Re: email issue in Filemaker server for adding attachments when sending using the FM Server SMTP
                      philmodjunk

                      I haven't tried this on a server scheduled script, but  you have get functions that return the location of those folders.

                       

                      Get ( DocumentsPath ) is one example. WHen you a script that uses this function, it returns the location of your documents folder. Run from a server scheduled script, it should return the server's documents folder.

                       

                      Quoting from the help file:

                      When running on FileMaker Server, Get(DocumentsPath) returns the location of the Documents folder, which is in the same folder as the server's Backups, Databases, and Scripts folders. The Documents folder is used as a shared location that scripts from different sessions or other processes on the machine can use to import or export files.

                      • 8. Re: email issue in Filemaker server for adding attachments when sending using the FM Server SMTP
                        SteveDevney

                        IT ATTACHES!!! :smileyhappy: , except the attachment does not correctly attach. It now causes the error: "There was an error opening this document. The file is damaged and could not be repaired. "

                         

                        It can find the file now though.

                         

                        I am now wondering how to get the email to attach correctly. It attaches correctly if I do not use the server, but once the server runs it stops attaching correctly.

                         

                        Thank you,

                        Steve 

                        • 9. Re: email issue in Filemaker server for adding attachments when sending using the FM Server SMTP
                          JFFortier

                          Same Problem here

                           

                          I create a variable $path= "filewin:" & Get ( DocumentsPath ) &  "name.xls"

                           

                          I use the export to create the file then I try to send it by e-mail SMTP

                          When the script run locally, every thing is fine, on the FMS10 with Win2003, it's not working

                           

                          I also trap the last error after sending the e-mail with the attachment to see if it's generating an error... NOPE !! the e-mail in some case is not even sent and still no error is generated ?!?!

                           

                          In my scrip I repeate 2 time a send e-mail with the same attachment, the 1st one is not sent at all, the second one is sent, but the file is not attach.

                           

                          Why make it simple when you can make it the Filemaker way ??!!