mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-18 20:59:39 +02:00
* Minimal code style enforcement * Formatting and lint code updates (no change in functionality)
16 lines
652 B
Ruby
16 lines
652 B
Ruby
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
|