Skip to content

Commit

Permalink
Re-add config.action_mailer.default_url_options
Browse files Browse the repository at this point in the history
  • Loading branch information
cmfcmf committed May 7, 2018
1 parent f93c1b7 commit 3e32cef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

# Don't care if the mailer can't send.
config.action_mailer.raise_delivery_errors = false
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }

config.action_mailer.perform_caching = false

Expand Down
4 changes: 4 additions & 0 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@
config.logger = ActiveSupport::TaggedLogging.new(logger)
end

if ENV['RAILS_HOST'].present?
config.action_mailer.default_url_options = { :host => ENV['RAILS_HOST'], :port => ENV['RAILS_PORT'] }
end

config.action_mailer.delivery_method = :smtp
# SMTP settings
config.action_mailer.smtp_settings = {
Expand Down

0 comments on commit 3e32cef

Please sign in to comment.