WubMail is a small command line tool to send emails to using a template and a list of emails.
$ gem install wubmail
email,name,sex email@example.com,Jack,male firstname.lastname@example.org,Gwen,female email@example.com,Ianto,male
From: Sunny <firstname.lastname@example.org> To: <%= name %> <<%= email %>> Subject: Hello <%= name %>! Hello <%= name %>, You are one hell of a cute <%= sex == "female" ? "girl" : "boy" %>!
Then type in a terminal:
$ wubmail welcome.txt users.csv
And it will print out an example. Send it to everybody by adding the
-s argument. That's it!
How do I add variables in the message?
Just create new columns in your csv. You may use any column name you want as long as it can be a Ruby variable name.
What can I put in my email?
The message is parsed using erb, which means you can put any amount of Ruby you'd like in it, between
How do I add headers?
Just add lines under From, To and Subject.
email,arrival_time,ps email@example.com,18 firstname.lastname@example.org,16 email@example.com,16 firstname.lastname@example.org,18,PS: Don't be late this time! email@example.com,18,PS: Don't forget to bring one of your favorite recipes.
From: Sunny <firstname.lastname@example.org> To: <%= email %> Subject: Great Party X-Mailer: Wubmail/1.0 Hello, Just a quick note to tell you that for the great party you should arrive at <%= arrival_time %> o'clock. Thanks, Sunny <%= ps %>