From 2083000027451249836c369eb961300d7faf5f99 Mon Sep 17 00:00:00 2001 From: "Akihiko Odaki (@fn_aki@pawoo.net)" Date: Fri, 7 Jul 2017 07:12:12 +0900 Subject: Set default From address in config (#3756) The old implementation sets default From address in mailers. It sets the address from SMTP_FROM_ADDRESS, or notifications@localhost. The behavior is occasionally undesired results. In production environment, notifications@localhost is likely to be incorrect. In testing environment, the email address should not be varied by a environment variable. After appling this change, In production environment, it will throw an exception when launching Mastodon. In testing environment, the address will be fixed with notifications@localhost. --- config/environments/development.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'config/environments/development.rb') diff --git a/config/environments/development.rb b/config/environments/development.rb index c81cf7bbe..406fa970b 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. -- cgit