9 Replies Latest reply on Feb 24, 2012 11:19 AM by TSGal

    Error 1506 when Sending Mail via SMTP Server in Runtime App

    databuzz

      Summary

      Error 1506 when Sending Mail via SMTP Server in Runtime App

      Description of the issue

      FileMaker Product(s) involved FileMaker Pro Advanced v10.0v1Operating System(s) involved Mac OS X 10.5..7Windows XP SP3Detailed description of the issue Creating a runtime application using the Developer Utilities of FileMaker Pro Advanced v10 that contains a space in the runtime application name causes the Send Mail via SMTP Server menu command or script step to fail with Error 1506 (Email(s) could not be sent successfully). If you create the runtime application without any spaces in the runtime application name the emails are sent successfully. This has been tested on both Mac OS X and Windows XP. Exact steps to reproduce the issue 1. Create a runtime application using FileMaker Pro Advanced v10.0v1 on either Windows or Mac OS X, ensuring that the runtime application name contains a space (e.g. "Contacts Database") 2. Open the runtime application and use the Send Mail command (or scripted) to send email via SMTP Server (I'm testing using Authenticated SMTP with Plain Password). 3. Error 1506 ("Email(s) could not be sent successfully") is returned.Expected Result Error 0 (emails sent successfully)Actual Result Error 1506Exact text of any error message(s) that appeared Error 1506Any additional configuration information/troubleshooting that is relevant to the issueAny workarounds that you have found Create the runtime application without contain any spaces (e.g. "ContactsDatabase") and it will work successfully/as expected. 

        • 1. Re: Error 1506 when Sending Mail via SMTP Server in Runtime App
          TSGal

          aduncan:

           

          Thank you for your post, and I apologize for the late reply.

           

          Unfortunately, I am unable to duplicate the problem.  This is what I did:

           

          1. With Filemaker Pro Advanced 10, I created a test database "Test.fp7".  I included a few fields and records.

           

          2. I created a script:

           

          Send Mail [ Send via SMTP Server ; No dialog ; To: "bentosupport2@filemaker.com" ; Subject : "Test" ; Message: "This is a test."

           

          3. In Layout Mode, I created a rectangle, made it a button that calls the script from step #2 above.

           

          4. I closed the file.

           

          5. I selected "Tools -> Developer Utilities"

           

          6. I added the file "Test.fp7".  I renamed the file "One Space".  I set the Project Folder to the Desktop.  The Runtime name is "One Space" and created a Runtime Solution.

           

          7. I then launched "One Space", clicked the rectangle, and the SMTP email was sent.  No error.

           

          Let me know what I am doing differently than you.  What other options are you selecting?

           

          If you have a specific file (clone), I would like to get it and try to duplicate the 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. 

          • 2. Re: Error 1506 when Sending Mail via SMTP Server in Runtime App
            databuzz
              

            Thanks TSGal,

             

            I've sent you a sample file as requested.

             

            I only tested using SMTP Authentication (with "Plain Password") as that was the requirement in our situation - we could only send via authenticated SMTP so I never tested just standard SMTP without authentication.

             

            You can use my file and enter the details of your SMTP server that uses authentication and see how it works, or try your file again but change the script to send usign SMTP Authentication with Plain Password.

             

            Regards,

            Andrew

            • 3. Re: Error 1506 when Sending Mail via SMTP Server in Runtime App
              TSGal

              aduncan:

               

              The following information is from our Testing department.

               

              "Unable to reproduce.  Tested in Windows XP and OS X 10.5.  Tried with plain and CRAM-MD5 authentication.  The runtime solution was created using one and two spaces."

               

              I know this information doesn't help you, but I'm unsure what else to try here.  Is there any other factor involved?  That is, do you have any plug-ins?  Custom menus?  Anything out of the ordinary?

               

              TSGal

              FileMaker, Inc. 

              • 4. Re: Error 1506 when Sending Mail via SMTP Server in Runtime App
                dburnham
                  

                I have created a runtime solution which is designed to export Excel files and then email them as attachments to a designated address.  The solution was compiled for both Macintosh and Windows with the identical solution name:   HAPPY-GoLucky.   So, there is a hyphen in the name but no spaces.

                 

                Today I discovered that the SMTP email function is not working correctly.  I opened the solution in FMA and stepped through the script in the debugger, and when it got to the SendMail step, the error 1506 was produced.

                 

                I was suspicious that there may have been a problem with authenticating to my designated SMTP mail server from the location where the runtime solution was being used, namely a client's office with a router and firewall and spam control features that I could not have anticipated during development. 

                 

                So I created a new FileMaker database with no records and no fields, just a single script. I named the database "Test" before I came to this forum to read this article about file names.   The test script worked fine.  Thus, I established that using FMA, not the runtime solution, there was no problem with the connection to the server.  I then came home to try building a runtime of my own, not for distribution, with some diagnostic fields on a layout and a modified script that I can execute in the runtime, one click at a time.  But before beginning that work, I checked here to see what I might find.

                 

                Now I am wondering if all I need to do is alter the name of the runtime solution.  And if punctuation characters like my hyphen behave the same way as the space.

                 

                Also, reading the previous messages in this thread have me confused about whether the file name issue is really the known cause of the error 1506 or if it is merely a hunch.

                 

                Hope to have your response asap.  thank you in advance. 

                • 5. Re: Error 1506 when Sending Mail via SMTP Server in Runtime App
                  TSGal

                  dburnham:

                   

                  Thank you for your post.

                   

                  It appears the spaces in the file name is a problem for the original poster, but neither myself nor our Testing department is able to duplicate the problem.

                   

                  Since you are unable to duplicate the problem, create a test solution "HAPPYGoLucky" and take it to the client site and see if either the original HAPPY-GoLucky or HAPPYGoLucky fails with the Send Mail via SMTP fails.  If the hyphen fails but not the new file, then we'll need to grab as much information about the system and SMTP Server as possible.

                   

                  TSGal

                  FileMaker, Inc. 

                  • 6. Re: Error 1506 when Sending Mail via SMTP Server in Runtime App
                    EricH

                    We reproduced the same problem using 10.0v3 on Windows 7 and Windows XP.  We replaced the space in the runtime solution name with an underscore and it worked just fine.

                    • 7. Re: Error 1506 when Sending Mail via SMTP Server in Runtime App
                      TSGal

                      Eric H:

                      Thank you for your post.

                      Although there has not been any update since last year, I have attached your post to the original case.  If any further information becomes available, I'll let you know.

                      TSGal
                      FileMaker, Inc.

                      • 8. Re: Error 1506 when Sending Mail via SMTP Server in Runtime App
                        PinterFrank

                        I encountered the same SMTP problem: Using FMP 11v02 Server Advanced on Win 2003 server (withour Mailserver). I am using a sample script using Swhich does work in let's say 5percent of the cases:

                        Send via SMTP Server ; No dialog; with Name field filled in or not. I get always Error 1506 (in 95% of the cases). I do not use any encryption and authentificiation.

                        There are a huge amount of reports in http://matthaughton.wordpress.com/2009/01/20/filemaker-send-mail-step-with-smtp-server-option/#comment-43 describing the problem. It looks like a long runner FMPRO Server Bug as it persists since version 10.

                        Please have a look at this link and try to find a solution for this issue.

                        • 9. Re: Error 1506 when Sending Mail via SMTP Server in Runtime App
                          TSGal

                          Pinter Frank:

                          Thank you for your post.

                          First, an error 1506 is a general "catch-all" error message.  From several users who have run into this issue, many of them are accessing a gmail SMTP server.  One user noticed the error occurred when several emails were sent in batch.  By placing a Pause/Resume script step for 1 second, the error didn't occur, which seems like it might have been a queueing issue, and that is why the reciptients did receive the emails even though the 1506 error was displayed.

                          The main issue appears to be the format of the Message-ID field is invalid using "Send Mail" script step to a SMTP server, as there is nothing that exists after the "@".

                          Thanks for the link, as the discussion there is consistent with what we are seeing and what has been posted in the forum.  One posting recently can be found at:

                          Send Mail via SMTP generates an invalid message id

                          When more information becomes available, I will let you know.

                          TSGal
                          FileMaker, Inc.