Skip to content

Commit

Permalink
Merge pull request #105 from nbudin/ses-email
Browse files Browse the repository at this point in the history
Send email via Amazon SESv2
  • Loading branch information
nbudin authored Oct 2, 2023
2 parents cf93f14 + 3e8aad2 commit 48046e8
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 13 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ gem "rails", "7.0.4.1"
# Reduces boot times through caching; required in config/boot.rb
gem "bootsnap", ">= 1.1.0", require: false

gem "aws-sdk-rails"
gem "devise", "~> 4.8.1"
gem "devise_invitable", "~> 2.0.6"
gem "devise-encryptable"
Expand Down
36 changes: 36 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,40 @@ GEM
ansi (1.5.0)
autoprefixer-rails (10.4.7.0)
execjs (~> 2)
aws-eventstream (1.2.0)
aws-partitions (1.830.0)
aws-record (2.12.0)
aws-sdk-dynamodb (~> 1, >= 1.85.0)
aws-sdk-core (3.184.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.5)
jmespath (~> 1, >= 1.6.1)
aws-sdk-dynamodb (1.95.0)
aws-sdk-core (~> 3, >= 3.184.0)
aws-sigv4 (~> 1.1)
aws-sdk-rails (3.9.0)
aws-record (~> 2)
aws-sdk-ses (~> 1, >= 1.50.0)
aws-sdk-sesv2 (~> 1, >= 1.34.0)
aws-sdk-sqs (~> 1, >= 1.56.0)
aws-sessionstore-dynamodb (~> 2)
concurrent-ruby (~> 1)
railties (>= 5.2.0)
aws-sdk-ses (1.56.0)
aws-sdk-core (~> 3, >= 3.184.0)
aws-sigv4 (~> 1.1)
aws-sdk-sesv2 (1.40.0)
aws-sdk-core (~> 3, >= 3.184.0)
aws-sigv4 (~> 1.1)
aws-sdk-sqs (1.63.0)
aws-sdk-core (~> 3, >= 3.184.0)
aws-sigv4 (~> 1.1)
aws-sessionstore-dynamodb (2.1.0)
aws-sdk-dynamodb (~> 1, >= 1.85.0)
rack (~> 2)
aws-sigv4 (1.6.0)
aws-eventstream (~> 1, >= 1.0.2)
bcrypt (3.1.18)
bcrypt_pbkdf (1.1.0)
bootsnap (1.15.0)
Expand Down Expand Up @@ -162,6 +196,7 @@ GEM
hashdiff (1.0.1)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
jmespath (1.6.2)
jquery-rails (4.5.1)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
Expand Down Expand Up @@ -329,6 +364,7 @@ PLATFORMS
DEPENDENCIES
ae_users_migrator
autoprefixer-rails
aws-sdk-rails
bcrypt_pbkdf
bootsnap (>= 1.1.0)
bootstrap-sass (~> 3.4.1)
Expand Down
21 changes: 8 additions & 13 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.

config.action_mailer.default_url_options = { :host => 'accounts.sugarpond.net' }
config.action_mailer.default_url_options = { host: "accounts.sugarpond.net" }
config.action_mailer.delivery_method = :sendmail

# Code is not reloaded between requests.
Expand All @@ -14,7 +14,7 @@
config.eager_load = true

# Full error reports are disabled and caching is turned on.
config.consider_all_requests_local = false
config.consider_all_requests_local = false
config.action_controller.perform_caching = true

# Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
Expand All @@ -23,7 +23,7 @@

# Disable serving static files from the `/public` folder by default since
# Apache or NGINX already handles this.
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present?

# Compress JavaScripts and CSS.
config.assets.js_compressor = Uglifier.new(harmony: true)
Expand All @@ -39,7 +39,7 @@

# Specifies the header that your server uses for sending files.
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX

# Store uploaded files on the local file system (see config/storage.yml for options)
config.active_storage.service = :local
Expand All @@ -57,7 +57,7 @@
config.log_level = :debug

# Prepend all log lines with the following tags.
config.log_tags = [ :request_id ]
config.log_tags = [:request_id]

# Use a different cache store in production.
# config.cache_store = :mem_cache_store
Expand Down Expand Up @@ -87,18 +87,13 @@
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')

if ENV["RAILS_LOG_TO_STDOUT"].present?
logger = ActiveSupport::Logger.new(STDOUT)
logger = ActiveSupport::Logger.new(STDOUT)
logger.formatter = config.log_formatter
config.logger = ActiveSupport::TaggedLogging.new(logger)
config.logger = ActiveSupport::TaggedLogging.new(logger)
end

# Do not dump schema after migrations.
config.active_record.dump_schema_after_migration = false

config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:address => "127.0.0.1",
:port => 25,
:enable_starttls_auto => false
}
config.action_mailer.delivery_method = :sesv2
end

0 comments on commit 48046e8

Please sign in to comment.