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
|
@user = user
|
||||||
@feedback = feedback
|
@feedback = feedback
|
||||||
|
|
||||||
mail to: FoodsoftConfig[:notification][:error_recipients],
|
mail to: feedback_recipients,
|
||||||
from: user,
|
from: user,
|
||||||
subject: I18n.t('mailer.feedback.subject')
|
subject: I18n.t('mailer.feedback.subject')
|
||||||
end
|
end
|
||||||
|
@ -179,4 +179,9 @@ class Mailer < ActionMailer::Base
|
||||||
address.display_name = name
|
address.display_name = name
|
||||||
address.format
|
address.format
|
||||||
end
|
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
|
end
|
||||||
|
|
|
@ -137,6 +137,8 @@ default: &defaults
|
||||||
notification:
|
notification:
|
||||||
error_recipients:
|
error_recipients:
|
||||||
- admin@foodcoop.test
|
- admin@foodcoop.test
|
||||||
|
feedback_recipients:
|
||||||
|
- support@foodcoop.test
|
||||||
sender_address: "\"Foodsoft Error\" <foodsoft@foodcoop.test>"
|
sender_address: "\"Foodsoft Error\" <foodsoft@foodcoop.test>"
|
||||||
email_prefix: "[Foodsoft]"
|
email_prefix: "[Foodsoft]"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue