Skip to content

Commit

Permalink
Merge pull request #3970 from annict/resend
Browse files Browse the repository at this point in the history
メールをResendから送る
  • Loading branch information
shimbaco committed Jan 28, 2024
2 parents 85530fe + caaf8ca commit e82f7c3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,5 @@ end

group :production do
gem "lograge"
gem "resend"
end
3 changes: 3 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,8 @@ GEM
regexp_parser (2.6.0)
request_store (1.5.1)
rack (>= 1.4)
resend (0.9.0)
httparty (>= 0.19.1)
responders (3.0.1)
actionpack (>= 5.0)
railties (>= 5.0)
Expand Down Expand Up @@ -663,6 +665,7 @@ DEPENDENCIES
rails_autolink
ransack
redis
resend
rspec-mocks
rspec-rails
sentry-rails
Expand Down
9 changes: 1 addition & 8 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,7 @@
protocol: "https://",
host: ENV.fetch("ANNICT_HOST")
}
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
address: ENV.fetch("ANNICT_SMTP_HOST"),
port: ENV.fetch("ANNICT_SMTP_PORT"),
user_name: ENV.fetch("ANNICT_SMTP_USERNAME"),
password: ENV.fetch("ANNICT_SMTP_PASSWORD"),
authentication: :plain
}
config.action_mailer.delivery_method = :resend

# Do not dump schema after migrations.
config.active_record.dump_schema_after_migration = false
Expand Down
5 changes: 5 additions & 0 deletions config/initializers/resend.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# frozen_string_literal: true

if Rails.env.production?
Resend.api_key = ENV["ANNICT_RESEND_API_KEY"]
end

0 comments on commit e82f7c3

Please sign in to comment.