Refactor:Remove Deprecated SENDGRID_USERNAME and SENDGRID_PASSWORD From production.rb (#11376)
This commit is contained in:
parent
2223e5468b
commit
025c5213d1
1 changed files with 2 additions and 3 deletions
|
|
@ -123,14 +123,13 @@ Rails.application.configure do
|
|||
|
||||
config.action_mailer.delivery_method = :smtp
|
||||
config.action_mailer.perform_deliveries = true
|
||||
sendgrid_api_key_present = ENV["SENDGRID_API_KEY"].present?
|
||||
config.action_mailer.default_url_options = { host: protocol + ENV["APP_DOMAIN"].to_s }
|
||||
ActionMailer::Base.smtp_settings = {
|
||||
address: "smtp.sendgrid.net",
|
||||
port: "587",
|
||||
authentication: :plain,
|
||||
user_name: sendgrid_api_key_present ? "apikey" : ENV["SENDGRID_USERNAME_ACCEL"],
|
||||
password: sendgrid_api_key_present ? ENV["SENDGRID_API_KEY"] : ENV["SENDGRID_PASSWORD_ACCEL"],
|
||||
user_name: "apikey",
|
||||
password: ENV["SENDGRID_API_KEY"],
|
||||
domain: ENV["APP_DOMAIN"],
|
||||
enable_starttls_auto: true
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue