A folder contains searchable PDF invoice files generated by my accounts system. I have a text file containing a list of account numbers and email addresses of some customers who want their invoice by email. Based on the account number [from the text file] I want to search for the accuntNum in the invoice files and if there is a match attach that invoice to an email, address it to the correct customer [email address is in the text file] and send it.
I am a complete novice at this game so any pointers to a workable approach would be gratefully received. My idea is to have a text file with accountNumber, emailAddress for each emailCustomer then step through that list matching the accountNumber to the relevant PDF then starting an email, attaching the file, addressing and sending it. I am stuck on how to get information from one file to interact with the other.
I have written/cobbled together a rule that finds a specified accountNum and produces an email. I am stuck on how to get rules that will step through the text file and look up each accountNum in turn.