lib/potassium/assets/config/mailer.rb.erb in potassium-5.1.4 vs lib/potassium/assets/config/mailer.rb.erb in potassium-5.2.0
- old
+ new
@@ -14,5 +14,15 @@
Mail.register_interceptor RecipientInterceptor.new(
ENV["EMAIL_RECIPIENTS"],
subject_prefix: "[<%= get(:heroku) ? '#{Heroku.stage.upcase}' : '#{Rails.env}' %>]"
)
end
+<% if get(:mailer_delivery_method) == :aws_sdk -%>
+creds = Aws::Credentials.new(
+ ENV['AWS_ACCESS_KEY_ID'],
+ ENV['AWS_SECRET_ACCESS_KEY']
+)
+
+Aws::Rails.add_action_mailer_delivery_method(
+ :aws_sdk, credentials: creds, region: ENV.fetch('AWS_REGION', 'us-east-1')
+)
+<% end -%>