4 Replies Latest reply on May 14, 2014 4:55 AM by briangirling

    Mail sent error capture in FMGo

    briangirling

      In FM Pro Adv 12/13, I have a solution which allows users to send emails via their mail client and the script tests for success or failure (user aborted the send). If successful (error 0) a 'mail sent' field is set to 'yes' and this field is checked if the user tries to send the email again.

       

      Now in Go13 I wish to test for mail generated by script and sent through the iOS mail client and enter the date that the mail was sent in the FM database file. However, my scripting doesn't seem to capture the mail sent state (sent or aborted). Error capture is set to 'on' in the script.

       

      Is this a limitation of FMGo and is there a workaround for this?

       

       

      Regards,

       

       

      Brian Girling

        • 1. Re: Mail sent error capture in FMGo
          Stephen Huston

          This from FMI's PDF on FM Go development:

          • "Send Mail doesn’t support Perform without dialog. The email displays on the device, and you can send it manually. This does not apply to mail sent through SMTP." also
          • "When you switch to another app, FileMaker Go enters a suspended state, and scripts are also suspended. When you return to FileMaker Go, the app and scripts resume from where they left off. For hosted files, if any of the records in the data set that a script is acting on were modified while FileMaker Go was suspended, the script aborts. If none of the records were modified, the script continues."

          Thes may or may not be your problem, but there is also a note about FM Go not recognizing external progam functions the same as Pro would, so some errors intended to be caught via another App may not be read by FM Go, especially if it was essentially dormant during the Send Mail attempt of the Mail App.

          • 2. Re: Mail sent error capture in FMGo
            rgordon

            In FMGO, the mail client will automatically open after the Send Email script step.  From what you are reporting it appears that FMGO can't trap the error when the email is canceled.  Probably because FMGO doesn't have the ability to trap for the error in the mail client.  If this is the case, you might only be able to set that the email was created. You probably can accomplish what you want it you use SMTP.

            • 3. Re: Mail sent error capture in FMGo
              Malcolm

              • "When you switch to another app, FileMaker Go enters a suspended state, and scripts are also suspended. When you return to FileMaker Go, the app and scripts resume from where they left off. For hosted files, if any of the records in the data set that a script is acting on were modified while FileMaker Go was suspended, the script aborts. If none of the records were modified, the script continues.”

               

              That’s interesting. If I’ve read it before I’ve forgotten it.

               

              Go on the iPhone is particularly susceptible to interruption from phone calls and messages. It really makes iPhone Go a hostile environment for scripted actions. Fortunately a hosted file allows you to perform the script on the server. That may become the safest thing to do.

               

              malcolm

              • 4. Re: Mail sent error capture in FMGo
                briangirling

                I forgot about that.  Thanks for reminding me.  I can overcome the issue another way.

                 

                Cheers

                 

                 

                Brian