Reputation: 5411
I'm trying to change my mandrilapp configuration to amazon ses in order to send emails from my rails app, but when I try to test, rails does not gave any error, but the email never array.
I have two verified address from my ses management console, but I don't understand why I can't send emails.
I have the following configuration:
config.action_mailer.delivery_method = :aws_sdk
config.action_mailer.smtp_settings = {
:address => "email-smtp.eu-west-1.amazonaws.com",
:port => 465,
:enable_starttls_auto => true,
:user_name => "blablablausername",
:password => "blablablablablablapassword",
:authentication => 'login',
:ssl => true,
:domain => 'mydomain.es',
}
any idea?
Thanks
UPDATE
I uploaded my code to heroku but when I sign up to create a new user I get the following error:
Aws::Errors::MissingCredentialsError (unable to sign request without credentials set)
but as you can see I have my user and pass credential.
What I'm doing wrong?
Thanks
Upvotes: 0
Views: 642
Reputation: 4940
I've successfully shipped an app using SES with the following setup.
# Gemfile
gem 'aws-ses', '~> 0.6.0', require: 'aws/ses'
# config/initializers/amazon_ses.rb
ActionMailer::Base.add_delivery_method :ses, AWS::SES::Base,
access_key_id: Rails.application.secrets.amazon_access_key,
secret_access_key: Rails.application.secrets.amazon_secret_key,
server: 'email.us-west-2.amazonaws.com'
# config/environments/development(or production).rb
config.action_mailer.delivery_method = :ses
You must also set the default URL options - config.action_mailer.default_url_options
.
More information is available on the GitHub README.
Upvotes: 1