8 Replies Latest reply on Jun 3, 2016 7:07 AM by CICT

    FM Server Scheduled Scripts with "Send Mail" step not working

    thefedorcompany

      Hi there, Everyone,

       

      I've encountered a weird problem with running a schedule script from FM Server 15. I had a script scheduled to check for email reminders set by my users and then send those email reminders from the "Send Mail" script step. I scheduled this script to run every 30 minutes on FM Server 14 and it was working great (successfully sending email reminders etc.).

       

      Just upgraded to FM Server 15 yesterday and now this script isn't working. It's running and performing all other functions in the script correctly *except* for sending email. No emails are being sent from this scheduled script anymore.

       

      Weird other fact: the script performs perfectly when I run it from my FMPA client; the script runs and sends reminders just fine.

       

      Any ideas or directions that I can explore for troubleshooting?

       

      Thanks!

       

      Jon

        • 1. Re: FM Server Scheduled Scripts with "Send Mail" step not working
          CarlSchwarz

          Check that the server itself still has access to the mail server, and check that it hasn't been spam blocked.

          Perhaps the mail server didn't like the change.

           

          If you use a FileMaker client on the server itself does it still send?

          1 of 1 people found this helpful
          • 2. Re: FM Server Scheduled Scripts with "Send Mail" step not working
            thefedorcompany

            Hey Carl, thanks for the suggestions!

             

            I checked the server itself from multiple angles including using telnet to connect to the SMTP server (outbound.att.net) through both ports that the SMTP server uses for SSL email. Everything checks out great and connects correctly.

             

            Checked on spam blocking - looks like I'm fine there.

             

            MyFM client on the server executes Send Mail just fine using the settings. Additionally, I set up FM Server to send me notifications via SMTP for when scheduled scripts run using the same email address and credentials and that runs just fine!

             

            I also created a new scheduled script to run a one-line script containing *only* a Send Mail step with the same email and credentials just to test and, sure enough, the script executes but doesn't send an email.

             

            So weird. I have no idea what else to do.

            • 3. Re: FM Server Scheduled Scripts with "Send Mail" step not working
              CICT

              Hi Jon

               

              Anything in the server log?

               

              Maybe worth creating a small log table in the solution that the script creates a record in and writes to a text field just before the SendMail script step to display any variables or values into a text field and then immediately after to record any last errors being reported at this point. May give you a clue.

               

              Regards

              Andy

              1 of 1 people found this helpful
              • 4. Re: FM Server Scheduled Scripts with "Send Mail" step not working
                CarlSchwarz

                As CICT said the server schedule itself may not be running or may be failing before reaching that point.

                 

                - Did you re-add the schedule to FMServer 15 after installing it?

                - Try to confirm that the script is actually reaching the send mail step, and log the error that get(currenterror) returns directly after the send mail script step.  The error code should point you in the right direction as to why it is failing.

                1 of 1 people found this helpful
                • 5. Re: FM Server Scheduled Scripts with "Send Mail" step not working
                  rudihoremans

                  We had exactly the same problem. The script runs all its steps and fails to send the mail.

                  When launched manually on a workstation, the script runs and the mail is send.

                  SMTP server configuration in mail script step was port 465, encryption SSL, plain pasword.

                  After changing to port 25, encryption "non", plain password - the script runs fine serverside AND the "send mail" step is working.

                  Hope this helps.

                  2 of 2 people found this helpful
                  • 6. Re: FM Server Scheduled Scripts with "Send Mail" step not working
                    CICT

                    We've a development FMS15 server running a test system where I've just created a simple script to send an email using my Office365 account - port 587 and TLS - to a personal account. The subject contains a timestamp.

                     

                    We checked that the user name and password entered within the server script didn't throw up any errors by logging in to the file first using FMPro.

                     

                    The script has been set to simply send an email with the settings all entered manually every 5 minutes via a server script. The emails are now arriving every 5 minutes successfully with the appropriate timestamp in the subject.

                     

                    Have you tried a similar single step script along the above lines to check the basic functionality?

                     

                    If this fails, do just check that this isn't one of those wonderful coincidences where a network change has been made on the same day you moved to v15 and, for instance, a domain or port has been blocked. I do appreciate that this is working from FM Pro, but it is possible you are accessing from a different network to the one the server is on.

                     

                    We are getting entries in the server log each time the script is running. What entries are you getting?

                     

                    All the best

                    Andy

                    1 of 1 people found this helpful
                    • 7. Re: FM Server Scheduled Scripts with "Send Mail" step not working
                      thefedorcompany

                      Thanks so much for the suggestions, y'all! Super helpful.

                      I used the server logs extensively to troubleshoot. I deleted the old schedules and re-scheduled the script to run. I created a separate test schedule that ran a different, one-line (just the "Send Mail" step only) script for troubleshooting. All this really helped the troubleshooting process.

                       

                      However, after banging my head against the wall for a while, I just decided to try using a different SMTP server. I entered the new credentials and BAM, the Send Mail step in my initial scheduled script worked perfectly (I tested it first with no encryption, plain password, and using port 25 - then I added SSL back in and used port 465 - both worked great!). Then, just to be sure, I tried using another different SMTP server...and THAT worked perfectly too. Looks like my initial problem all along was the SMTP server.

                       

                      That was really puzzling to me because, as I mentioned above, I used that same initial SMTP server just fine sending notifications to myself from FM Server 15. However, the only difference I noticed between the SMTP settings in the Send Mail step and the SMTP settings in FM Server 15 was that "Do not verify the server certificate" checkbox. I have that checkbox checked in FM Server. My guess is that my initial SMTP server would have worked just fine in the Send Mail step if it had the same option.

                       

                      Ah well. As it is, I just moved SMTP servers and all is well.

                       

                      Thanks again for all the helpful feedback and suggestions! Really appreciate them! CICT CarlSchwarz rudihoremans

                      • 8. Re: FM Server Scheduled Scripts with "Send Mail" step not working
                        CICT

                        I'm glad to hear it is sorted; a nice way to go into the weekend.

                         

                        All the best

                         

                        Andy

                        1 of 1 people found this helpful