mirror of
https://github.com/we-promise/sure
synced 2026-04-25 17:15:07 +02:00
Added option to skip TLS verification for mailer (#1291)
This commit is contained in:
@@ -74,6 +74,7 @@ SMTP_PORT=465
|
||||
SMTP_USERNAME=
|
||||
SMTP_PASSWORD=
|
||||
SMTP_TLS_ENABLED=true
|
||||
SMTP_TLS_SKIP_VERIFY=false
|
||||
|
||||
# Address that emails are sent from
|
||||
EMAIL_SENDER=
|
||||
|
||||
@@ -78,11 +78,12 @@ Rails.application.configure do
|
||||
config.action_mailer.default_url_options = { host: ENV["APP_DOMAIN"] }
|
||||
config.action_mailer.delivery_method = :smtp
|
||||
config.action_mailer.smtp_settings = {
|
||||
address: ENV["SMTP_ADDRESS"],
|
||||
port: ENV["SMTP_PORT"],
|
||||
user_name: ENV["SMTP_USERNAME"],
|
||||
password: ENV["SMTP_PASSWORD"],
|
||||
tls: ENV["SMTP_TLS_ENABLED"] == "true"
|
||||
address: ENV["SMTP_ADDRESS"],
|
||||
port: ENV["SMTP_PORT"],
|
||||
user_name: ENV["SMTP_USERNAME"],
|
||||
password: ENV["SMTP_PASSWORD"],
|
||||
tls: ENV["SMTP_TLS_ENABLED"] == "true",
|
||||
openssl_verify_mode: ENV["SMTP_TLS_SKIP_VERIFY"] == "true" ? OpenSSL::SSL::VERIFY_NONE : OpenSSL::SSL::VERIFY_PEER
|
||||
}
|
||||
|
||||
# Ignore bad email addresses and do not raise email delivery errors.
|
||||
|
||||
Reference in New Issue
Block a user