Thanks to help from the experts I have a database that batch creates pdfs for a list of trader accounts, saving them in a "orders" directory with the name being the trader number and date of preperation. The format for the file name is "XXXX YYYY-MM-DD".pdf with the XXXX being replaced by each traders 4 digit trader number. This part works great - now I am hoping to automatically email these reports. I have a table called "trading groups" that includes among other things a trader number that corresponds to the "XXXX" in the file name, along with 1 or more email addresses that the reports for that book needs to go to. Some of the books have 1 email address, some have 3 - in essence the reports for that book number need to go to whichever addresses are listed for each trader number in the "trader groups" database.
There may be several reports on a daily basis that do not have an email address associated with them, so I need to be able to skip those.