Enable to configure feedback recipient address (PR #901)
This commit is contained in:
parent
1f6598c144
commit
4306389f93
2 changed files with 8 additions and 1 deletions
|
@ -103,7 +103,7 @@ class Mailer < ActionMailer::Base
|
|||
@user = user
|
||||
@feedback = feedback
|
||||
|
||||
mail to: FoodsoftConfig[:notification][:error_recipients],
|
||||
mail to: feedback_recipients,
|
||||
from: user,
|
||||
subject: I18n.t('mailer.feedback.subject')
|
||||
end
|
||||
|
@ -179,4 +179,9 @@ class Mailer < ActionMailer::Base
|
|||
address.display_name = name
|
||||
address.format
|
||||
end
|
||||
|
||||
# use the (new) feedback_recipients option, but fallback to error_recipients for backwards compatibility
|
||||
def feedback_recipients
|
||||
FoodsoftConfig[:notification][:feedback_recipients] || FoodsoftConfig[:notification][:error_recipients]
|
||||
end
|
||||
end
|
||||
|
|
|
@ -137,6 +137,8 @@ default: &defaults
|
|||
notification:
|
||||
error_recipients:
|
||||
- admin@foodcoop.test
|
||||
feedback_recipients:
|
||||
- support@foodcoop.test
|
||||
sender_address: "\"Foodsoft Error\" <foodsoft@foodcoop.test>"
|
||||
email_prefix: "[Foodsoft]"
|
||||
|
||||
|
|
Loading…
Reference in a new issue