Configure SMTP settings #289

Merged
bustikiller merged 4 commits from smtp-settings into main 2025-07-05 11:56:23 +00:00
Showing only changes of commit b3f339a02b - Show all commits

View File

@ -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, {
port: File.read("/run/secrets/smtp_port").strip.to_i, address: File.read("/run/secrets/smtp_address").strip,
user_name: File.read("/run/secrets/smtp_user_name").strip, port: File.read("/run/secrets/smtp_port").strip.to_i,
password: File.read("/run/secrets/smtp_password").strip, user_name: File.read("/run/secrets/smtp_user_name").strip,
authentication: File.read("/run/secrets/smtp_authentication").strip.to_sym password: File.read("/run/secrets/smtp_password").strip,
} 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.