mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-30 18:49:39 +02:00
* Add climate_control gem and test helper * Replace ENV mods in upgrades test * Replace ENV mods in registrations test * Remove ENV references in hostings controller * Update ENV refs in mailer test * ActiveStorage cleanup * Consolidate queue config so appropriate adapter runs in test environment * Make test environment more explicit * Centralize self hosting config * Remove flaky system test
16 lines
636 B
Ruby
16 lines
636 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
|