9 Replies Latest reply on Sep 21, 2009 8:00 PM by dburnham

    Possible SnowLeopard SMTP bug

    CupertinoDev

      Summary

      Possible SnowLeopard SMTP bug

      Description of the issue

      I just found something that may be a bug with FMP 10 and Snow Leopard.I finishing up a database for a client that will be used as a runtime.  Earlier today I installed Snow Leopard on my development box (Mac Pro  6gigs RAM) running FMP Advanced 10. I built a simple script to loop  through records (testing with 4 records in the found set), building a  global variable as a CSV to populate an email that can used to import  into FM on the recipients end. The Variable looks like this:first & last & street & city & (¶) &first & last & street & city & (¶) &on and onThe variable is then used as the body of the email.This works fine in a non-runtime situation. After building the  runtime, each time I run the script, I get the spinning beach ball and  FMP hangs causing a force quit.I then moved the runtime to another box with Leopard 10.5.8 (not SL)  and the script runs fine.I went back to the SL box tried it again, still hangs.Any ideas.... it appears to be something with Snow Leopard.

        • 1. Re: Possible SnowLeopard SMTP bug
          TSGal

          CupertinoDev:

           

          Thank you for your post.

           

          Unfortunately, I cannot duplicate the problem.  This is what I have done...

           

          1. Using FileMaker Pro 10.0v3 Advanced on Mac OS X 10.5.8, I created a new database file "SendMail.fp7" with the following fields:

           

          Name (Text)

          Email (Text)

          Body (Text - global storage)

           

          2. I entered four records with names and email addresses.

           

          3. I created a script "SendMail" as follows:

           

          Show All Records

          Go to Record/Request/Page [ First ]

          Set Field [ Body ; "" ]

          Loop

             Set Field [ Body ; Body & Name & " - " & Email & "¶" ]

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

          End Loop

          Send Mail [ Send via SMTP Server ; No dialog ; To: <email address> ; Subject: "TEST" ; Message: Body ]

           

          4. I executed the script, and the email was sent to the email address and received.  Each record on its own line in the Body of the message.

           

          5. I created a runtime solution, launched the solution, executed the script, and the email was sent and received.

           

          6. I copied the solution to another machine running Snow Leopard.  I launched the solution, executed the script, and the email was sent and received.

           

          Make sure the Snow Leopard system has access to the SMTP server.

           

          Any additional information you can provide that will help me duplicate the problem would be appreciated. 

           

          TSGal

          FileMaker, Inc. 

          • 2. Re: Possible SnowLeopard SMTP bug
            CupertinoDev
              

            Thanks TS Gal for taking a look. 

             

            What do you mean by "Make sure the Snow Leopard system has access to the SMTP server?"

             

            The script works fine in FMP 10.0v3 Advanced. It just hangs when in the runtime on the same computer.

             

            CupertinoDev 

            • 3. Re: Possible SnowLeopard SMTP bug
              TSGal

              CupertinoDev:

               

              Sorry for the confusion.  In my instance, I had to move the solution to another machine, and I totally forgot that you were on the same machine.  Therefore, disregard my statement.

               

              Still, I'd like to duplicate the problem.  Is it possible you can send me a copy of the file?  I'll create a runtime solution here and see if I encounter the same problem.  I have sent you a private message (top of this page - right side - X Messages) with instructions where to send the file.

               

              TSGal

              FileMaker, Inc. 

              • 4. Re: Possible SnowLeopard SMTP bug
                CupertinoDev
                  

                Hi TSGal,

                Sorry for the delay in replying. I'm pretty busy, and did some more testing yesterday. I'm going to play with it a bit more.

                 

                I'm curious, when you built the runtime, did you remove admim privliges? This is how I built the runtime.

                 

                I'll get back to you after a bit more testing. I'll also clean the important data out of the file and send it as well.

                 

                Thanks 

                • 5. Re: Possible SnowLeopard SMTP bug
                  CupertinoDev
                    

                  Hi TSGal,

                  OK, this is what I know so far.

                   

                  I don't think this is a bug in FMP runtime. The series of events were this:

                  Built the script, tested in FMP. All was OK. Next day installed SL and later in the day built the first runtime test of this feature. It failed, over and over…. leaving me with the spinning beach ball and the necessity to force quit each time. I then thought to myself, I'll try it on one of the boxes still running 10.5.x, and it worked fine. Went back to SL, and consistently failed. Back to the old Leopard, ran fine. Started cleaning up the script of anything that might possibly cause it to fail. Still broken. If I changed the send Mail script to not use FM's SMTP and used my Mail.app client, it works fine. So a day or so goes by, and I keep trying different scenarios, still the same story.

                   

                  This morning, I restarted the SL box, and IT WORKED! Tried again and again, still working. Went on to some other projects, came back and it failed. This Mac Pro, running 10.6 SL has had an issue when waking from sleep, in that it cannot get an internet connection for several minutes. I've tried to trace this down, with no luck. This afternoon, I found this out……. when the runtime would fail, if I opened the Network Prefs, set the network to a non connected network like Firewire, etc. and then back to the Ethernet static IP, the runtime would work.

                   

                  I believe this is a symptom of my OS and probably some software that I have installed in the past.

                   

                  I really appreciate your taking the time to test this.

                   

                  A couple of things I really think is missing in FMP in regards to this are:

                  1. It would be really nice if there was some kind of function, or at least an error code that would tell us if the SMTP failed.

                  2. The solution I'm building will use this functionality to send new records to the Home office and I'm triggering the script on file close. Now, if the user does not have a connection, the script fails and no one knows.

                  My scenario is to find the new records, build the variable, send the email and then mark the records as having been sent. If the user has no connection, those records are not qued up in any manner. So, my solution has been to add a web viewer to the layout (1px x 1px), set the URL to return the current IP address, then test to see if the web viewer has an ip address. If I get an ip address back, I run the script, if not, I don't mark the records as sent and exit the script. The biggest problem with this approach, is I've had to go to a different layout, then return to the original layout, because this is the only way I know to refresh the web viewer. After I return to the original layout, I had to add a 5 second pause to give the web viewer time to return the IP address. I then run the test, and do the appropriate branching.

                   

                  Best,

                  CupertinoDev 

                  • 6. Re: Possible SnowLeopard SMTP bug
                    TSGal

                    CupertinoDev:

                     

                    Thank you for continuing to test the problem.

                     

                    There are a set of error codes specifically for SMTP.  You can look at Knowledge Base Article #7067 for a listing of error codes.  Please see codes 1501-1507.

                     

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

                     

                    A common error code is 1506.  The information has been sent to the SMTP server, and the only information received back is if it was successful (Error Code 0) or not (1506).  Therefore, you can check to see if Get (LastError) was greater than zero.

                     

                    To obtain the system IP Address, use:

                     

                    Get (SystemIPAddress)

                     

                    ... to obtain a list of the IP addresses connected to the network for the client machine (including Wi-Fi and VPN).

                     

                    This may be easier than refreshing a web viewer.

                     

                    TSGal

                    FileMaker, Inc. 

                    • 7. Re: Possible SnowLeopard SMTP bug
                      CupertinoDev
                        

                      Hey TSGal,

                      Thanks, I don't know how I missed the error codes. I tried the Get ( systemIPAddress ), and that wouldn't work for my need. I believe it's possible to return a local (supplied by a dhcp server) ip address, and still not have an internet connection. The web viewer actually goes "out" and gets the ip address, then returns it to the browser. I use <http://www.whatismyip.com/automation/n09230945.asp> to do this. 

                       

                      BTW, I noticed that the SL upgrade has caused SMTP issues for many adopters.

                       

                      Thanks again,

                      CupertinoDev 

                      • 8. Re: Possible SnowLeopard SMTP bug
                        TSGal

                        CupertinoDev:

                         

                        Yes, some users have had reported difficulty using SMTP with Snow Leopard, but as you see from my post above, I did not have any issues.  I know that doesn't mean it isn't a problem, but it does show that it does work if the setting are right.  As more information becomes available, hopefully we'll discover what settings cause it to fail.

                         

                        TSGal

                        FileMaker, Inc. 

                        • 9. Re: Possible SnowLeopard SMTP bug
                          dburnham
                            

                          I posted about error 1506 in a different thread, but if it helps those concerned about Snow Leopard, I don't think that has anything to do with it.

                           

                          I created my runtime solution about a month before the release of Snow Leopard, and I discovered the problem today on the computer of a user who is running Windows XP.

                           

                          When I ran a test on my Mac which is now running Snow Leopard, I did not see the problem when I tested in FMA 10 in Windows running under Parallels 4.  I admit the thing about the file name is very peculiar, but I have more confidence in that being the issue than Snow Leopard.