]> cat aescling's git repositories - mastodon.git/commit
Set default From address in config (#3756)
authorAkihiko Odaki (@fn_aki@pawoo.net) <akihiko.odaki.4i@stu.hosei.ac.jp>
Thu, 6 Jul 2017 22:12:12 +0000 (07:12 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Thu, 6 Jul 2017 22:12:12 +0000 (00:12 +0200)
commit2083000027451249836c369eb961300d7faf5f99
treeb65fa158ac68e0135abbb843fa3ddc19b03dc47b
parent18d3fa953b5af8ab17cc93c33cb95cec37127712
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.
app/mailers/application_mailer.rb
app/mailers/user_mailer.rb
config/environments/development.rb
config/environments/production.rb
config/environments/test.rb