Created
May 28, 2013 09:53
-
-
Save basti/5661700 to your computer and use it in GitHub Desktop.
Quick Amazon SES setup for Rails app
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Quick way to setup Amazon SES as a mailer for a Rails app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/initializers/amazon_ses.rb | |
ActionMailer::Base.add_delivery_method :ses, AWS::SES::Base, | |
:access_key_id => '##YOUR_KEY##', | |
:secret_access_key => '##YOUR_SECRET_KEY##' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem 'aws-ses', :require => "aws/ses" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/environments/production.rb | |
config.action_mailer.delivery_method = :ses |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With this configuration mailer will use default SES endpoint (it will not take
AWS_REGION
from environment).So, you'll have to configure it also if you're using non-default region: