mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 20:14:08 +00:00
Simplify self host settings controller (#1230)
This commit is contained in:
@@ -1,16 +1,3 @@
|
||||
class ApplicationMailer < ActionMailer::Base
|
||||
layout "mailer"
|
||||
|
||||
after_action :set_self_host_settings, if: -> { Rails.configuration.app_mode.self_hosted? }
|
||||
|
||||
private
|
||||
|
||||
def set_self_host_settings
|
||||
mail.from = Setting.email_sender
|
||||
mail.delivery_method.settings.merge!({ address: Setting.smtp_host,
|
||||
port: Setting.smtp_port,
|
||||
user_name: Setting.smtp_username,
|
||||
password: Setting.smtp_password,
|
||||
tls: ENV.fetch("SMTP_TLS_ENABLED", "true") == "true" })
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user