diff --git a/config/environments/production.rb b/config/environments/production.rb index 7053fd3..57e1dd8 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -26,7 +26,9 @@ config.action_mailer.perform_deliveries = true config.action_mailer.raise_delivery_errors = true config.action_mailer.delivery_method = :smtp -config.action_mailer.smtp_settings = HashWithIndifferentAccess.new( - YAML::load(ERB.new(File.read(File.join(RAILS_ROOT, 'config/mailer.yml'))).result)['production'] -) +if File.exist?(File.join(RAILS_ROOT, 'config/mailer.yml')) + config.action_mailer.smtp_settings = HashWithIndifferentAccess.new( + YAML::load(ERB.new(File.read(File.join(RAILS_ROOT, 'config/mailer.yml'))).result)['production'] + ) +end