Avoid error in case SMTP configuration is not present
Some checks failed
Run unit tests / check-licenses (pull_request) Successful in 31s
Run unit tests / copyright_notice (pull_request) Successful in 42s
Run unit tests / unit_tests (pull_request) Successful in 1m10s
Run unit tests / rubocop (pull_request) Successful in 23s
Run unit tests / build-static-assets (pull_request) Failing after 3m4s
Some checks failed
Run unit tests / check-licenses (pull_request) Successful in 31s
Run unit tests / copyright_notice (pull_request) Successful in 42s
Run unit tests / unit_tests (pull_request) Successful in 1m10s
Run unit tests / rubocop (pull_request) Successful in 23s
Run unit tests / build-static-assets (pull_request) Failing after 3m4s
This commit is contained in:
parent
d6607cd997
commit
b3f339a02b
@ -73,13 +73,19 @@ Rails.application.configure do
|
|||||||
|
|
||||||
config.action_mailer.perform_caching = false
|
config.action_mailer.perform_caching = false
|
||||||
config.action_mailer.delivery_method = :smtp
|
config.action_mailer.delivery_method = :smtp
|
||||||
config.action_mailer.smtp_settings = {
|
config.action_mailer.smtp_settings = begin
|
||||||
|
{
|
||||||
address: File.read("/run/secrets/smtp_address").strip,
|
address: File.read("/run/secrets/smtp_address").strip,
|
||||||
port: File.read("/run/secrets/smtp_port").strip.to_i,
|
port: File.read("/run/secrets/smtp_port").strip.to_i,
|
||||||
user_name: File.read("/run/secrets/smtp_user_name").strip,
|
user_name: File.read("/run/secrets/smtp_user_name").strip,
|
||||||
password: File.read("/run/secrets/smtp_password").strip,
|
password: File.read("/run/secrets/smtp_password").strip,
|
||||||
authentication: File.read("/run/secrets/smtp_authentication").strip.to_sym
|
authentication: File.read("/run/secrets/smtp_authentication").strip.to_sym
|
||||||
}
|
}
|
||||||
|
rescue Errno::ENOENT
|
||||||
|
{}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
# Ignore bad email addresses and do not raise email delivery errors.
|
# Ignore bad email addresses and do not raise email delivery errors.
|
||||||
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user