We currently have a network folder that contains several PDF invoices from various clients. The email address of the client is embedded in each invoice (see attachment for example). We want a powershell program to process each invoice, group the invoices that get sent to the same person, then have the program email all invoices going to the same person as attachments with a form letter to the person's email address. We want to automate the "emailing of invoices" process that is currently being done manually. A person may receive an email with 1 invoice or several invoices.
We want some notification if the email process fails so that we can invoice the client in another way.
Attached is a sample invoice. We can change the format if it will allow for an easier read of the email address.