mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-02 20:15:22 +02:00
Simplify self host settings controller (#1230)
This commit is contained in:
parent
cb75c537fe
commit
7fabca4679
22 changed files with 252 additions and 399 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue