Automate emailing PDF attachment based on separate list

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

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.
stakhanov
 
Posts: 1
Joined: Fri Mar 16, 2018 11:41 am

You'll need a script to go through the file. Also, there is no built-in email action so you'd need to use Automator or AppleScript to do that part as well.

You might want to look into "mail merge" software as it is a specific case that other vendors have provided solutions for.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support

cron