awdeorio / mailmerge

A simple, command line mail merge tool.
MIT License
140 stars 41 forks source link

Block list #112

Open neiljohari opened 3 years ago

neiljohari commented 3 years ago

Would be nice to be able to take a list of emails, throw them into a textfile, and ask mailmerge to not send any emails to recipients on that list.

This comes from mailmerge usage in 280 where students who have dropped (or even don't want to be emailed anymore) may still remain on the Roster or Autograder grade dump.

awdeorio commented 3 years ago

How about making a recipe in the README for doing this? Here's an example:

Database and a "block" list of emails that do not want to receive messages

$ cat mailmerge_database.csv 
email,name
alice@gmail.com,Alice
bob@umich.edu,Bob
chris@gmail.com,Chris

$ cat block.txt
alice@gmail.com
chris@gmail.com

Filtered database

$ grep -v -f block.txt mailmerge_database.csv 
email,name
bob@umich.edu,Bob