2 Replies Latest reply on Sep 22, 2013 6:27 AM by philmodjunk

    Email from different tables

    dankweb

      Title

      Email from different tables

      Post

           I have a table for staff (each with an e-mail address) and a table for employees (each with an e-mail address). I am needing a basic outline of how I would send an e-mail to a group that included a few selected staff members and a few selected employees.

           In other words, I would search for a few of the staff and a few employees, and send that group an e-mail.

           Thanks.

            

        • 1. Re: Email from different tables
          GuyStevens

               You will need to have some temporary field. Possibly a checkbox that you check for every person you want to mail.

               You could create scripts to check a whole found set of contacts if you are for instance looking for a bunch of contacts from a certain city or something like that.

               Then you send your mail by creating a found set of all the checked contacts. You either send one mail to all contacts. Or you loop trough the found set and mail everyone individually.

               You can mail directly trough an smtp server so you don't have to worry about sending the mails trough your email program manually.

               Then you have to remember to clear all of those check boxes at some point so you are ready to start checking other contacts without having any of them still checked from the previous time.

               A great way to clear all boxes is to:

               - Show all records
               - Replace Field contents [ Your Temp Field ; "" ]

               This wil set the same value ( "" means no value) in a field for every record in the found set.

          • 2. Re: Email from different tables
            philmodjunk

                 In the long run, you probably will find your overall design of your database much simpler to work with if you put "staff" and "employees" records in the same table. Presumably there is some difference between "staff" and "employees" even though the names are synonyms, but you can add one more field to such a combined table with a field that you use to distinguish one group from the other. And if there are a large number of fields that one group requires and the other does not, you can still set up a combined table of names, email addresses and any other data that is needed for both groups and then use a related table with the fields that are specific to just one group or the other. That way, you still get a single table as the source of your email addresses.