mirror of
https://github.com/Evolix/chexpire.git
synced 2024-05-05 02:05:09 +02:00
Dynamic mailer configuration
This commit is contained in:
parent
dba1ab55d9
commit
8ff94076c0
|
@ -12,5 +12,9 @@ development:
|
|||
<<: *default
|
||||
host: "chexpire.local"
|
||||
|
||||
production:
|
||||
action_mailer_config:
|
||||
delivery_method: :sendmail
|
||||
|
||||
# test configuration included in file used by CI services
|
||||
<%= IO.read Rails.root.join("config", "chexpire.test.yml") %>
|
||||
|
|
|
@ -44,6 +44,10 @@ Rails.application.configure do
|
|||
|
||||
config.action_mailer.default_url_options = { host: config.chexpire.fetch("host"), port: 3000 }
|
||||
|
||||
config.chexpire.fetch("action_mailer_config", {}).each_pair do |key, value|
|
||||
config.action_mailer[key] = value
|
||||
end
|
||||
|
||||
# Print deprecation notices to the Rails logger.
|
||||
config.active_support.deprecation = :log
|
||||
|
||||
|
|
|
@ -65,10 +65,12 @@ Rails.application.configure do
|
|||
# Ignore bad email addresses and do not raise email delivery errors.
|
||||
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
||||
# config.action_mailer.raise_delivery_errors = false
|
||||
config.action_mailer.default_url_options = { host: 'chexpire.evolix.org' }
|
||||
|
||||
config.action_mailer.default_url_options = { host: config.chexpire.fetch("host") }
|
||||
|
||||
config.chexpire.fetch("action_mailer_config", {}).each_pair do |key, value|
|
||||
config.action_mailer[key] = value
|
||||
end
|
||||
|
||||
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
||||
# the I18n.default_locale when a translation cannot be found).
|
||||
config.i18n.fallbacks = true
|
||||
|
|
|
@ -67,6 +67,9 @@ Rails.application.configure do
|
|||
# config.action_mailer.raise_delivery_errors = false
|
||||
|
||||
config.action_mailer.default_url_options = { host: config.chexpire.fetch("host") }
|
||||
config.chexpire.fetch("action_mailer_config", {}).each_pair do |key, value|
|
||||
config.action_mailer[key] = value
|
||||
end
|
||||
|
||||
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
||||
# the I18n.default_locale when a translation cannot be found).
|
||||
|
|
Loading…
Reference in a new issue