aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/FixMyStreet/App.pm4
-rw-r--r--perllib/FixMyStreet/Cobrand/Default.pm6
-rw-r--r--perllib/FixMyStreet/Email.pm2
-rw-r--r--perllib/FixMyStreet/SendReport/Email.pm2
-rw-r--r--templates/web/base/admin/config_page.html2
5 files changed, 9 insertions, 7 deletions
diff --git a/perllib/FixMyStreet/App.pm b/perllib/FixMyStreet/App.pm
index 88ead39bc..1b75b9ba2 100644
--- a/perllib/FixMyStreet/App.pm
+++ b/perllib/FixMyStreet/App.pm
@@ -342,7 +342,7 @@ sub send_email {
my $template = shift;
my $extra_stash_values = shift || {};
- my $sender = $c->config->{DO_NOT_REPLY_EMAIL};
+ my $sender = $c->cobrand->do_not_reply_email;
my $email = $c->construct_email($template, $extra_stash_values) or return;
my $result = 0;
@@ -360,7 +360,7 @@ sub construct_email {
my ($c, $template, $extra_stash_values) = @_;
$extra_stash_values //= {};
- my $sender = $c->config->{DO_NOT_REPLY_EMAIL};
+ my $sender = $c->cobrand->do_not_reply_email;
my $sender_name = $c->cobrand->contact_name;
# create the vars to pass to the email template
diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm
index ae7be6892..9851b4896 100644
--- a/perllib/FixMyStreet/Cobrand/Default.pm
+++ b/perllib/FixMyStreet/Cobrand/Default.pm
@@ -805,15 +805,17 @@ sub fetch_area_children {
);
}
-=item contact_name, contact_email
+=item contact_name, contact_email, do_not_reply_email
Return the contact name or email for the cobranded version of the site (to be
-used in emails).
+used in emails). do_not_reply_email is used for emails you don't expect a reply
+to (for example, confirmation emails).
=cut
sub contact_name { FixMyStreet->config('CONTACT_NAME') }
sub contact_email { FixMyStreet->config('CONTACT_EMAIL') }
+sub do_not_reply_email { FixMyStreet->config('DO_NOT_REPLY_EMAIL') }
=item abuse_reports_only
diff --git a/perllib/FixMyStreet/Email.pm b/perllib/FixMyStreet/Email.pm
index 65b537d85..3d7b48539 100644
--- a/perllib/FixMyStreet/Email.pm
+++ b/perllib/FixMyStreet/Email.pm
@@ -152,7 +152,7 @@ sub find_template_dir {
sub send_cron {
my ( $schema, $template, $vars, $hdrs, $env_from, $nomail, $cobrand, $lang_code ) = @_;
- my $sender = FixMyStreet->config('DO_NOT_REPLY_EMAIL');
+ my $sender = $cobrand->do_not_reply_email;
$env_from ||= $sender;
if (!$hdrs->{From}) {
my $sender_name = $cobrand->contact_name;
diff --git a/perllib/FixMyStreet/SendReport/Email.pm b/perllib/FixMyStreet/SendReport/Email.pm
index 5b0151595..80b60b381 100644
--- a/perllib/FixMyStreet/SendReport/Email.pm
+++ b/perllib/FixMyStreet/SendReport/Email.pm
@@ -59,7 +59,7 @@ sub envelope_sender {
if ($row->user->email && $row->user->email_verified) {
return FixMyStreet::Email::unique_verp_id('report', $row->id);
}
- return FixMyStreet->config('DO_NOT_REPLY_EMAIL');
+ return $row->get_cobrand_logged->do_not_reply_email;
}
sub send {
diff --git a/templates/web/base/admin/config_page.html b/templates/web/base/admin/config_page.html
index 15d232f4e..a534292be 100644
--- a/templates/web/base/admin/config_page.html
+++ b/templates/web/base/admin/config_page.html
@@ -122,7 +122,7 @@ running version <strong>[% git_version || 'unknown' %]</strong>.
[% INCLUDE just_value value="EMAIL_DOMAIN" %]
[% INCLUDE with_cobrand value="CONTACT_NAME" cob=c.cobrand.contact_name %]
[% INCLUDE with_cobrand value="CONTACT_EMAIL" cob=c.cobrand.contact_email %]
-[% INCLUDE just_value value="DO_NOT_REPLY_EMAIL" %]
+[% INCLUDE with_cobrand value="DO_NOT_REPLY_EMAIL" cob=c.cobrand.do_not_reply_email %]
[% INCLUDE subsection heading="Development" %]
[% INCLUDE just_value value="STAGING_SITE" %]