A loop to send email messages sent to an Amazon SQS queue.
-
right_aws -
sudo gem install right_aws
-
json -
sudo gem install json
-
An Amazon SQS account & queue
-
Update accounts.yml with your own Amazon account data.
-
Update accounts.yml with your SMTP data
ruby ./mailer.rb
The mailer expects that JSON messages will be sent to the queue with this format / data:
{
"identifier": "mysupersecretidentifier",
"to": "someone@somewhere.com",
"from": "me@here.com",
"subject": "Title Goes Here",
"body": "Captivating, I'm sure"
}
This does not handle failure scenarios with any grace whatsoever. In fact, it will probably lose whatever email it pukes on and then just die without even saying "sorry".