1
0
Fork 0
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:
Zach Gollwitzer 2024-10-02 12:07:56 -04:00 committed by GitHub
parent cb75c537fe
commit 7fabca4679
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 252 additions and 399 deletions

View file

@ -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