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.
This commit is contained in:
committed by
Eugen Rochko
parent
18d3fa953b
commit
2083000027
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user