gearheads
/
mastodon
Archived
2
0
Fork 0

Fix SMTP_ENABLE_STARTTLS_AUTO/SMTP_TLS/SMTP_SSL environment variables don't work (#17216)

#17215
gh/stable
tkr 2022-01-13 20:05:22 +09:00 committed by GitHub
parent ea61d3acd6
commit b52fdb4c6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -107,9 +107,9 @@ Rails.application.configure do
:authentication => ENV['SMTP_AUTH_METHOD'] == 'none' ? nil : ENV['SMTP_AUTH_METHOD'] || :plain, :authentication => ENV['SMTP_AUTH_METHOD'] == 'none' ? nil : ENV['SMTP_AUTH_METHOD'] || :plain,
:ca_file => ENV['SMTP_CA_FILE'].presence || '/etc/ssl/certs/ca-certificates.crt', :ca_file => ENV['SMTP_CA_FILE'].presence || '/etc/ssl/certs/ca-certificates.crt',
:openssl_verify_mode => ENV['SMTP_OPENSSL_VERIFY_MODE'], :openssl_verify_mode => ENV['SMTP_OPENSSL_VERIFY_MODE'],
:enable_starttls_auto => ENV['SMTP_ENABLE_STARTTLS_AUTO'] || true, :enable_starttls_auto => ENV['SMTP_ENABLE_STARTTLS_AUTO'] != 'false',
:tls => ENV['SMTP_TLS'].presence, :tls => ENV['SMTP_TLS'].presence && ENV['SMTP_TLS'] == 'true',
:ssl => ENV['SMTP_SSL'].presence, :ssl => ENV['SMTP_SSL'].presence && ENV['SMTP_SSL'] == 'true',
} }
config.action_mailer.delivery_method = ENV.fetch('SMTP_DELIVERY_METHOD', 'smtp').to_sym config.action_mailer.delivery_method = ENV.fetch('SMTP_DELIVERY_METHOD', 'smtp').to_sym