What would be the best way to go about making ActionMailer send mail via Amazon SES in Rails 3?
Edit:
This is now a gem:
gem install amazon-
using :sendmail
, I managed to get all emails to send running apt-get install postfix
as root on my AWS machine and using all the default answers.
SES just was released into beta today, so I doubt that there is a ready-to-go gem (at least, not that I've seen). You could write a custom module based upon their developer documents:
http://docs.amazonwebservices.com/ses/latest/DeveloperGuide/
You can provide delivery method to action mailer in your environment.
config.action_mailer.delivery_method = AmazonSES.deliver
For now you are likely on your own writing the delivery code.
I created a simple Rails / SES API gem that uses Signature v4 to sign the request. This is best used for transactional emails such as contact us, user registration, etc.
Rails SES API integration gem
Please feel free to improve on it & contribute.
I also have a gem out that supports sending e-mail through SES from Rails 3:
https://github.com/drewblas/aws-ses
It also has all the API for verifying/managing e-mail addresses
After poking around a bit I ended up just making a simple class to do this.
https://github.com/abronte/Amazon-SES-Mailer
In rails, you can get the encoded email message:
m = UserMailer.welcome.encoded
AmazonSES.new.deliver(m)