3 ms·
This can easily be done with a small shell script and standard linux commands. #!/usr/bin/bash MAILTEXT=$(grep "dbkey" db.txt) cat emails.lst|
by porlw 2y ago
This can easily be done with a small shell script and standard linux commands.
#!/usr/bin/bash
MAILTEXT=$(grep "dbkey" db.txt)
cat emails.lst|while read ADDR NAME
do
mail -s "Subject" $ADDR <<EOT
Dear $NAME
$MAILTEXT
EOT
done
Schedule with cron.
- nh2 2y agoThis is unsafe (glob injection). Never use bash unless you know exactly what you are doing, and even then, better don't. Even worse to recommend bash to somebody who already stated that they don't know what they are doing. Just use Python for such scripts, it won't let you shoot yourself into the foot with surprising behavior.