summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/mailers/application_mailer.rb1
-rw-r--r--app/mailers/user_mailer.rb1
-rw-r--r--config/environments/development.rb2
-rw-r--r--config/environments/production.rb2
-rw-r--r--config/environments/test.rb2
5 files changed, 6 insertions, 2 deletions
diff --git a/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb
index 2e730c19b04..95b770ff111 100644
--- a/app/mailers/application_mailer.rb
+++ b/app/mailers/application_mailer.rb
@@ -1,7 +1,6 @@
# frozen_string_literal: true
class ApplicationMailer < ActionMailer::Base
- default from: ENV.fetch('SMTP_FROM_ADDRESS') { 'notifications@localhost' }
layout 'mailer'
helper :instance
diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb
index 6abf9c9caff..1517c027e87 100644
--- a/app/mailers/user_mailer.rb
+++ b/app/mailers/user_mailer.rb
@@ -1,7 +1,6 @@
# frozen_string_literal: true
class UserMailer < Devise::Mailer
- default from: ENV.fetch('SMTP_FROM_ADDRESS') { 'notifications@localhost' }
layout 'mailer'
helper :instance
diff --git a/config/environments/development.rb b/config/environments/development.rb
index c81cf7bbedd..406fa970b2d 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -62,6 +62,8 @@ Rails.application.configure do
# routes, locales, etc. This feature depends on the listen gem.
# config.file_watcher = ActiveSupport::EventedFileUpdateChecker
+ config.action_mailer.default_options = { from: 'notifications@localhost' }
+
# If using a Heroku, Vagrant or generic remote development environment,
# use letter_opener_web, accessible at /letter_opener.
# Otherwise, use letter_opener, which launches a browser window to view sent mail.
diff --git a/config/environments/production.rb b/config/environments/production.rb
index bd87d79a785..d9c9da684fd 100644
--- a/config/environments/production.rb
+++ b/config/environments/production.rb
@@ -73,6 +73,8 @@ Rails.application.configure do
config.action_mailer.perform_caching = false
# E-mails
+ config.action_mailer.default_options = { from: ENV.fetch('SMTP_FROM_ADDRESS') }
+
config.action_mailer.smtp_settings = {
:port => ENV['SMTP_PORT'],
:address => ENV['SMTP_SERVER'],
diff --git a/config/environments/test.rb b/config/environments/test.rb
index db98263a64a..bde69eba15a 100644
--- a/config/environments/test.rb
+++ b/config/environments/test.rb
@@ -30,6 +30,8 @@ Rails.application.configure do
config.action_controller.allow_forgery_protection = false
config.action_mailer.perform_caching = false
+ config.action_mailer.default_options = { from: 'notifications@localhost' }
+
# Tell Action Mailer not to deliver emails to the real world.
# The :test delivery method accumulates sent emails in the
# ActionMailer::Base.deliveries array.