diff --git a/app/mailers/mailer.rb b/app/mailers/mailer.rb index 40a8d1de..4ff340a0 100644 --- a/app/mailers/mailer.rb +++ b/app/mailers/mailer.rb @@ -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 diff --git a/config/app_config.yml.SAMPLE b/config/app_config.yml.SAMPLE index 1000683a..fb3596ed 100644 --- a/config/app_config.yml.SAMPLE +++ b/config/app_config.yml.SAMPLE @@ -137,6 +137,8 @@ default: &defaults notification: error_recipients: - admin@foodcoop.test + feedback_recipients: + - support@foodcoop.test sender_address: "\"Foodsoft Error\" " email_prefix: "[Foodsoft]"