Add file "config/smtp.yml"
This commit is contained in:
parent
7ff269aa23
commit
2e54a159f8
2 changed files with 21 additions and 9 deletions
|
@ -2,12 +2,15 @@
|
||||||
|
|
||||||
# Be sure to restart your server when you modify this file.
|
# Be sure to restart your server when you modify this file.
|
||||||
|
|
||||||
ActionMailer::Base.smtp_settings = {
|
Rails.application.config_for(:smtp).try(&:deep_symbolize_keys).try do |config|
|
||||||
user_name: 'apikey',
|
ActionMailer::Base.smtp_settings = {
|
||||||
password: Rails.application.credentials.sendgrid_api_key,
|
address: config[:address],
|
||||||
domain: Rails.application.config.site_domain,
|
port: config[:port]&.to_i,
|
||||||
address: 'smtp.sendgrid.net',
|
domain: config[:domain],
|
||||||
port: 587,
|
user_name: config[:user_name],
|
||||||
authentication: :plain,
|
password: config[:password],
|
||||||
enable_starttls_auto: true,
|
authentication: config[:authentication]&.to_sym,
|
||||||
}
|
enable_starttls_auto: config[:enable_starttls_auto],
|
||||||
|
openssl_verify_mode: config[:openssl_verify_mode],
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
9
config/smtp.yml
Normal file
9
config/smtp.yml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
production:
|
||||||
|
address: smtp.sendgrid.net
|
||||||
|
port: 587
|
||||||
|
domain: libertarian-party.com
|
||||||
|
user_name: apikey
|
||||||
|
password: <%= Rails.application.credentials.sendgrid_api_key %>
|
||||||
|
authentication: plain
|
||||||
|
enable_starttls_auto: true
|
||||||
|
openssl_verify_mode: peer
|
Reference in a new issue