How to send personalized emails to a group of recipients

(Comments)

I've run into several occasions where I need to send automatic emails at a specific time to a bunch of senders, and I found Google Sheet API together with a cron job can accomplish what I want to do, and it is flexible enough for me to customize it in wahtever way I would like to.

I saved email addresses in a Google Sheet, write a script in Python to use the Google API to get specific emails (or  names and emails if I need to make the email sounds more presonalized), and develop that script into a cron job.

Here are some details on how to enable a cron job on Mac.

1. To enable a cron job on Mac, open a terminal and type in

env EDITOR=nano crontab -e

2. Enter a line in the formate of

* * * * * command to execute 
│ │ │ │ └─── day of week (0 - 6) (0 to 6 are Sunday to Saturday, or use names; 7 is Sunday, the same as 0) 
│ │ │ └──────── month (
1 - 12)
│ │ └───────────── day
of month (1 - 31)
│ └────────────────── hour (
0 - 23)
└─────────────────────── min (
0 - 59)

For example:

30 9 2 1 2 cd ~/Documents/Learning/LibraryWebsite && ./crontasks_wed.sh

This tells the computer to run the script crontasks_wed.sh at 9:30 am on Wednesday, Jan 2.

3. To see a list of your active crontab jobs, use the following command:

crontab -l

Currently unrated

Comments