4 Replies Latest reply on Jul 19, 2013 1:43 PM by Aigaion

    Found set as email address list

    jaytyo

      I have an application where I want to send out email to people who subscribe. I do a find on a table that contains the subscriptions and am trying to pull the userID - and connect to a linked table with the email address. In fact, I've made a portal on the subscription table form to show the email address. When I do the find, I get multiple records, but when I try to put them in a field or global variable, all I get is the first email address.

       

      How can I get the list of users/email addresses returned instead of just the first one?

       

      Thanks,

       

      Jay

        • 1. Re: Found set as email address list
          brian.curran

          Hi Jay,

          Have you tried checking the tick box for "Collect addresses across found set"

           

          https://dl.dropboxusercontent.com/u/1948142/FM_Forums/SendMail.png

           

          Message was edited by: brian.curran

          • 2. Re: Found set as email address list
            LyndsayHowarth

            Remembering of course that all recipients will see the email addresses of the others. You might want to do this for the BCC and make the TO an address of your own.

             

            - Lyndsay

            • 3. Re: Found set as email address list
              jaytyo

              Can this be done in a script, and keeping in mind I have a report's worth of data (in another found set?)?

              • 4. Re: Found set as email address list
                Aigaion

                You could script the Open of an offscreen window with the report containing the email addresses you want to collect.  Your script would then go to the first record in that window and put the value in the Email Address field into a global variable, e.g., $$Emails.  Now Loop to the same field in the next record, exiting after the last record.  If the field for the email address is Not IsEmpty on a subsequent record, modify $$Emails to become $$Emails & "," & the contents of the email field on that record.  When the looping process is finshed, $$Emails will be a comma seperated list of all Emails in your report.  You can then script Send Mail to use $$Emails as the value in your BCC section.  As mentioned in another reply, you would want to use BCC as To or CC would reveal the addressses to everyone getting the message.  After you've sent the Emails, don't forget to close the off screen window from which you were gathering the data or to clear the value in $$Emails.

                 

                If you are looping through several thousand records, this process may take too long - particularly over WAN.  However, if a few hundred records and/or on a LAN, the time taken to complete the loop should be minimal.