10 Replies Latest reply on Jun 6, 2016 3:07 PM by CarstenLevin

    SMTP won't send to multiple emails

    rubinjm

      I have a script that sends an email to multiple recipients (see below). When I set the send mail step to use SMTP (exchange server), several of the email addresses are not included. If I use email client (Outlook), all the email addresses are listed.

       

      The strange thing is I have a similar script set up in a different database that uses SMTP and multiple addresses are listed without any problem.

       

      I'm using FileMaker Pro Adv 15 with FMS 15.

       

       

       

       

       

       

       

      List ( Obs Unit::APP1 email lookup ; Obs Unit::attending email lookup ; Obs Unit::ED attending email lookup ; Obs Unit::ED res_APP email lookup ; Obs Unit::APP2 email lookup)

        • 1. Re: SMTP won't send to multiple emails
          monkeybreadsoftware

          Well, if you need more options than FileMaker offers, you may want to look into using a plugin.

           

          e.g. send email via MBS Plugin:

          MBS Blog - Sending Email with FileMaker via MBS Plugin

          • 2. Re: SMTP won't send to multiple emails
            user19752

            Help says

            Note  If you specify multiple email addresses for the To, CC, or BCC options, separate each recipient's email address with a comma. Some email clients do not accept other separators, such as a semicolon.

             

            Your calculation use Char(13) as separator.

            • 3. Re: SMTP won't send to multiple emails
              monkeybreadsoftware

              Only comma is allowed. That's part of the specs and has nothing to do with the email apps.

              • 4. Re: SMTP won't send to multiple emails
                rubinjm

                I replaced the semicolons with commas and it worked. However when I open the script step, the semicolons are back:

                 

                List ( Obs Unit::APP1 email lookup;Obs Unit::attending email lookup;Obs Unit::ED attending email lookup;Obs Unit::ED res_APP email lookup;Obs Unit::APP2 email lookup)

                 

                 

                 

                (The cc field has a bunch of emails separated by semicolons and that works fine.)

                • 5. Re: SMTP won't send to multiple emails
                  skywillmott

                  The List function will return a line separated list of values, so you need to substitute out the carriage returns with commas, so your calculation should look like:

                   

                  Substitute ( List ( Obs Unit::APP1 email lookup;Obs Unit::attending email lookup;Obs Unit::ED attending email lookup;Obs Unit::ED res_APP email lookup;Obs Unit::APP2 email lookup) ; "¶" ; "," )

                  • 6. Re: SMTP won't send to multiple emails
                    karina

                    Nice that you always want to help, but it looks looks every answer is a promotion of the MBS plugin. I'm sure it's a great plugin but there are a lot of possibilities to solve a problem without using the plugin.

                     

                    Not everybody wants to use  or buy plugins.

                     

                    Maybe next time, you could answer the question and after that answer you could mention that they could always buy the MBSplugin if they want to have more options.

                    And if you do mention the plugin, maybe you could give the the script or formula to use it as well or give them a sample file.

                     

                    But maybe it's only me who finds your answers a bit plugin-spamming and am I seeing this all wrong.

                     

                    Hope you're not disappointed by me mentioning this. I'm sure you mean well and also want to help, but it would be nice to see another (non commercial) answer to a question next time

                    • 7. Re: SMTP won't send to multiple emails
                      monkeybreadsoftware

                      Well, for 10 years now I help people with their FileMaker problems.

                      The tool I use to help people is my plugin. So every tip I provide usually requires the plugin. And a few people here on the forum have the plugin already, so for them it's a free solution. Others may try the plugin for the first time.

                       

                      When you download the plugin, you find in the examples -> CURL -> Email a few example databases. Including a few for sending emails. The link above is a guide explaining the various commands. You can click on the commands, you find more details including examples. For example on the SendMail.PrepareCURL function we include an example.

                       

                      So if you can live with FileMaker functions, that's fine.

                      But if you need more options for multiple attachments, text encodings, SSL options, Proxy support, timeouts or detailed error log, you can use the plugin on FM Pro, Runtime or Server.

                      • 8. Re: SMTP won't send to multiple emails
                        karina

                        I understand and thats great, and it's also really good there are plugin developers like you.

                        And I would absolutely promote your plugin if it's the only answer I know to a question.

                         

                        The send mail plugin is problebly a bit nice but we do the same thing with applescript on IOS and and VB scripting on windows. So there's a lot possible without using a plugin.

                         

                        The only thing I ask from you is to don't promote your plugin in discussions where's an answer to a question without buying your plugin.

                        • 9. Re: SMTP won't send to multiple emails
                          user19752

                          You did it wrong way, function parameter separator can be entered as comma on histrorical reason (old version of FM used comma instead of semicolon), but it not effects to the result.

                          skywillmott wrote correct way.

                          • 10. Re: SMTP won't send to multiple emails
                            CarstenLevin

                            Have you considered not sending via an email client but directly via smtp server. Also consider sending one email to each recipient, unless you specifically want the cc approach.

                             

                            Best regards


                            Carsten

                             

                             

                            Ps. In my opinion sending via SMTP server directly is a much better and more reliable solution, giving you the possibility to track which mails that was actually sent etc. etc.