move email initializer to env configs because thats where it belongs

parent e399dec7
......@@ -82,7 +82,13 @@ Rails.application.configure do
authentication: :plain
}
config.action_mailer.delivery_method = :smtp
else
config.action_mailer.delivery_method = :sendmail
end
config.action_mailer.default_url_options = {
host: ENV['DEVISE_EMAIL_DOMAIN'] || 'staging.aoz-freiwillige.ch',
protocol: 'https'
}
# 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.
......
if Rails.env.production?
ActionMailer::Base.default_url_options = {
host: ENV['DEVISE_EMAIL_DOMAIN'] || 'staging.aoz-freiwillige.ch',
protocol: 'https'
}
else
ActionMailer::Base.default_url_options = {
host: 'localhost:3000'
}
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment