Merge branch 'master' into registry-186

This commit is contained in:
Artur Beljajev 2016-11-03 18:29:42 +02:00
commit e52c747946
3 changed files with 5 additions and 6 deletions

View file

@ -21,7 +21,7 @@ smtp_openssl_verify_mode: 'peer' # 'none', 'peer', 'client_once','fail_if_no_pee
smtp_enable_starttls_auto: 'true' # 'false'
# If your mail server requires authentication, please change.
smtp_authentication: 'plain' # 'plain', 'login', 'cram_md5'
registrant_url: 'https:/registrant.example.com' # for valid email body registrant links
registrant_url: 'https://registrant.example.com' # for valid email body registrant links
# Staging env does not send any emails unless they are whitelisted
whitelist_emails_for_staging: >
test@example.org,

View file

@ -60,6 +60,10 @@ module Registry
g.helper false
end
registrant_portal_uri = URI.parse(ENV['registrant_url'])
config.action_mailer.default_url_options = { host: registrant_portal_uri.host,
protocol: registrant_portal_uri.scheme }
config.action_mailer.delivery_method = :smtp
config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = true

View file

@ -33,11 +33,6 @@ Rails.application.configure do
config.action_view.raise_on_missing_translations = true
config.action_mailer.raise_delivery_errors = false
config.action_mailer.default_url_options = { host: 'localhost:8081' }
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = { address: 'localhost', port: 1025 } # MailCatcher
# for finding database optimization
config.after_initialize do
Bullet.enable = true