diff --git a/config/application.rb b/config/application.rb index 2121039dc..dd3a1213e 100644 --- a/config/application.rb +++ b/config/application.rb @@ -23,7 +23,7 @@ module Registry # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. - config.time_zone = ENV['time_zone'] || 'Tallinn' # NB! It should be defined, + config.time_zone = ENV['time_zone'] || 'Tallinn' # NB! It should be defined, # otherwise ActiveRecord usese other class internally. # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. @@ -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