I read with interest the article regarding sending an email based upon parsing through a csv file to pick up the name and email address. This looks like most of what I need to accomplish my objective with the exception that I would like for the script to run once daily and send the email one day before a date stored in the csv file. This is to remind someone that they need to perform a a certain task the next day. Emails will be sent using Apple Mail as the MTA through my gmail account.
The csv will contain the following:
firstname, lastname, action date
The script would need to pick up the first name and date from the csv file. I have coded the email text into the script as shown in the previous example.
Pseudocode:
- Script runs just after midnight every day parsing the csv to determine who should receive the email on what date.
- For the selected names, create and send an email the day prior to the required action.
- As a bonus, the script could resend the reminder on the due date as well as any new reminders for the following day.
I suppose I could manually subtract one day in my csv to make the coding easier.
I am just getting started with Applescript, and do not know how to modify the existing script to accomplish this objective.