Closed rickpastoor closed 4 years ago
I am also wondering about this... in the case of the answer being "NO", are there any other recommended gems for a simple SES Sigv4 use-case? I'm trying to avoid going native with the AWS SDKv3!
Same here! Still looking for alternative gems
I am also wondering too. And hope to have an answer! thank
+1 please share if you find an alternative
We just replaced this gem with smtp and aws ses credentials config: https://hixonrails.com/ruby-on-rails-tutorials/ruby-on-rails-action-mailer-configuration/#amazon-ses-account-setup
Anyone tried this https://github.com/tablecheck/mail-ses ? I'm going to play with it but it may take me a couple weeks to get to it..
FYI, This fork https://github.com/ofri-switzerland/aws-ses/pull/1 worked perfectly
Otherwise there is the official AWS Rails plugin.
Can this be closed as https://github.com/ofri-switzerland/aws-ses/pull/1 has been merged?
Ah, sorry, my mistake, has only been merged in their fork. I will try that out.
Ideally I'd like to merge in @ofri-switzerland 's fork, however it looks like they hardcoded the us-east-1 REGION into the request. I believe to really make it work correctly for everyone the us-east-1 could be the default but should also be overridable through a config param
If anyone knows of a fixed version that accomplishes this, I'm happy to merge it and cut a new version!
Hi @drewblas; fair point! - we probably can make that configurable and prep pull request for review if you're interested in releasing new version of your gem :) /cc @m33h (let's discuss this tomorrow maybe)
edit: we will get back to this very next week, pinky promise!
I've replaced this gem with the official aws-sdk-rails
gem from AWS.
Here's a quick step-by-step:
Gemfile
:-gem "aws-ses", require: "aws/ses"
+gem "aws-sdk-rails" # This gem is used to send emails via SES
$ rails credentials:edit
aws:
ses:
access_key_id: "..."
secret_access_key: "..."
config/initializers/aws_ses.rb
):if Rails.env.production?
Aws::Rails.add_action_mailer_delivery_method(
:ses,
credentials: Aws::Credentials.new(
Rails.application.credentials.aws[:ses][:access_key_id],
Rails.application.credentials.aws[:ses][:secret_access_key]
),
region: "us-east-1"
)
end
config/environments/production.rb
has the following config:config.action_mailer.delivery_method = :ses
That's it. I've just deployed my application and it's working perfectly 👍
Just upgraded the gem to the latest version and seems to work perfectly 👍 Thanks @m33h!
@lucascaton Do you know how to confirm in rails if ses version is upgraded, how to confirm this in ec2 or rails that now ses version is upgraded? after changing this gem
@sunilsoma In my own way, I checked returned value of mail method like below.
mail(subject: subject, to: to).to_json
There is this value.
delivery_method>client>config>api>metadata>signatureVersion
I think If signatureVersion is "v4", then it's fine.
This json is very long. So be careful to handle it (some editor may freeze. I used sublime text and it could handle).
Here's the email I got about an impending deprecation:
Is anywone working on updating this gem to support V4? Or should I look for a different gem?