openstreetmap-website/config/initializers/action_mailer.rb
Andy Allan 7b0de13c61 Allow smtp settings to be configured through the settings system
This allows easier configuration using the settings.local.yml files

Fixes #2571
2020-11-25 16:12:49 +00:00

16 lines
546 B
Ruby

# Configure ActionMailer SMTP settings
ActionMailer::Base.smtp_settings = {
:address => Settings.smtp_address,
:port => Settings.smtp_port,
:domain => Settings.smtp_domain,
:enable_starttls_auto => Settings.smtp_enable_starttls_auto,
:authentication => Settings.smtp_authentication,
:user_name => Settings.smtp_user_name,
:password => Settings.smtp_password
}
# Set the host and protocol for all ActionMailer URLs
ActionMailer::Base.default_url_options = {
:host => Settings.server_url,
:protocol => Settings.server_protocol
}