2 Replies Latest reply on Jan 25, 2011 12:14 PM by psijmons

    send email via SMTP will not accept global variable for address on remote databases

    psijmons

      Summary

      send email via SMTP will not accept global variable for address on remote databases

      Product

      FileMaker Pro

      Version

      FMPA v11.2

      Operating system version

      OSX10.6.5

      Description of the issue

      When trying to send an email via server-SMTP and enter the email address via a $Email global variable, it will not process the emai but returns an error 1506.

      This works well on a local testserver, but when the databases are hosted remotely it fails.
      Only when I set this param in a field first, then use that field to populate the To: field, it works on the remote machine.

      All other parts (CC, subject, body) will work from global variables, it is only the email address where this fails.

      Steps to reproduce the problem

      Using similar script steps where the To: field is hardcoded or where the To; field is coming from a table field.

      When a variable comes in from a script param and is set as $ variable, the problem occurs. With debugger I can see the $var is correct and gives a correct email address but it simply fails with error 1506.

      Expected result

      It should accept a global var

      Actual result

      error 1506 when database is remote

      Exact text of any error message(s) that appear

      1506

      Configuration information

      Local testserver means FMSA (11.02.217) is running on the same machine as FMPA11.0.2
      Remote server means FMSA (10.0.2.206) on remote hosted db with FMPA11.0.2 as client
      (SMPT-server sending is a FMS10 feature, right?)

      Workaround

      Added a field to enter the email address and use field contents to fill the email settings.

      See image for different options tested:
      option 1 will fail
      option 2 will work
      option 3 will work

      Edit_Script__process_email_via_SMTP_server_%5BMSP%5D_To-Subj-CC-Body__%28WelcomeViewer%29.jpg

        • 1. Re: send email via SMTP will not accept global variable for address on remote databases
          TSGal

          Peter Sijmons:

          Thank you for your post.

          I am unable to replicate the problem.  I created a script with the following steps:

          Set Variable [ $ToEmail ; <text string> ]
          Set Variable [ $Subject ; <text string> ]
          Set Variable [ $Message ; <text string> ]
          Send Mail [ Send via SMTP Server: No dialog ;  To: $ToEmail ; Subject: $Subject ; Message: $Message ]

          I placed a button on the layout that calls this script.

          Running this locally works as expected.

          I turned on Network Sharing and set the file to access for all users.  I put the file on a server running FileMaker Server 11 Advanced.

          On another machine, I launched FileMaker Pro 11.0v2 Advanced, selected "Open Remote..." from the File menu, selected the hosted file on the server and opened it.  I clicked the button to execute the script, and an email was sent to me without any errors.

          Let me know what I else I need to do.

          TSGal
          FileMaker, Inc.

          • 2. Re: send email via SMTP will not accept global variable for address on remote databases
            psijmons

            Thanks TSGal,

            it works when the server is running FMS11, not when the server is running FMS10 (at least that is the only difference I can track)

            No need to go deeper into this, it is a feature that will only be incorporated in a LabScores version that requires FMS11.

            Thanks for trying to reproduce this.

            Peter