- recipients to be stored in a text file
- message to be stored in a text file
- To: set to the recipient's mail
But I didn't find a solution. My currently prefered language being Ruby, I looked for a Ruby library, and found Bulkmail, but it didn't work out of the box, and error logs were not very informational. And I really didn't want to loose time on that....
As the title implies, I finally settled on using Perl's Mail::Bulkmail to write a small script with this usage:
bulkmail.pl -f '"mailer name"' \
-m path/to/message.txt \
-r "/path/to/recipients_list.txt" \
-s "subject of mail"
You can put all the recipients in one text file, one recipient per line:
"John Doe"
You can download the script, but before running it, edit the config file to set the correct domain used for the SMTP HELO!
It had been years I haven't touched to Perl, and this wasn't enough to remind me of Perl's syntax and concepts. But this has only confirmed what I knew: Perl has an unbelievably high number of libraries and that can make it the tool to use for a lot of applications! Wondering if I shouldn't refresh my Perl :-)
No comments:
Post a Comment