aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/FixMyStreet/App.pm9
-rw-r--r--templates/email/default/alert-problem-area.txt2
-rw-r--r--templates/email/default/alert-problem-council.txt2
-rw-r--r--templates/email/default/alert-problem-nearby.txt2
-rw-r--r--templates/email/default/alert-problem-ward.txt2
-rw-r--r--templates/email/default/alert-problem.txt2
-rw-r--r--templates/email/default/alert-update.txt2
-rw-r--r--templates/email/default/questionnaire.txt2
-rw-r--r--templates/email/default/submit-brent.txt2
-rw-r--r--templates/email/default/submit.txt2
10 files changed, 18 insertions, 9 deletions
diff --git a/perllib/FixMyStreet/App.pm b/perllib/FixMyStreet/App.pm
index 3d9f0a511..c689ea42f 100644
--- a/perllib/FixMyStreet/App.pm
+++ b/perllib/FixMyStreet/App.pm
@@ -319,6 +319,15 @@ sub send_email_cron {
unpack('h*', random_bytes(5, 1))
);
+ $params->{_parameters_}->{signature} = $c->view('Email')->render(
+ $c, 'signature.txt', {
+ additional_template_paths => [
+ FixMyStreet->path_to( 'templates', 'email', $c->cobrand->moniker, $c->stash->{lang_code} )->stringify,
+ FixMyStreet->path_to( 'templates', 'email', $c->cobrand->moniker )->stringify,
+ ]
+ }
+ );
+
my $email = mySociety::Locale::in_gb_locale { mySociety::Email::construct_email($params) };
if ( FixMyStreet->test_mode ) {
diff --git a/templates/email/default/alert-problem-area.txt b/templates/email/default/alert-problem-area.txt
index 196f3631e..3696c87d4 100644
--- a/templates/email/default/alert-problem-area.txt
+++ b/templates/email/default/alert-problem-area.txt
@@ -5,7 +5,7 @@ The following new problems have been added within
<?=$values['data']?>
-[% INCLUDE 'signature.txt' %]
+<?=$values['signature']?>
To stop receiving emails when there are new problems in
<?=$values['area_name']?>, please follow this link:
diff --git a/templates/email/default/alert-problem-council.txt b/templates/email/default/alert-problem-council.txt
index 09c8cc3f8..5544a2043 100644
--- a/templates/email/default/alert-problem-council.txt
+++ b/templates/email/default/alert-problem-council.txt
@@ -4,7 +4,7 @@ The following new problems have been reported to <?=$values['area_name']?>:
<?=$values['data']?>
-[% INCLUDE 'signature.txt' %]
+<?=$values['signature']?>
To stop receiving emails when there are new problems reported to
<?=$values['area_name']?>, please follow this link:
diff --git a/templates/email/default/alert-problem-nearby.txt b/templates/email/default/alert-problem-nearby.txt
index a0a8489ca..0c88dab5a 100644
--- a/templates/email/default/alert-problem-nearby.txt
+++ b/templates/email/default/alert-problem-nearby.txt
@@ -4,7 +4,7 @@ The following nearby problems have been added:
<?=$values['data']?>
-[% INCLUDE 'signature.txt' %]
+<?=$values['signature']?>
To stop receiving emails when there are nearby problems,
please follow this link: <?=$values['unsubscribe_url']?>
diff --git a/templates/email/default/alert-problem-ward.txt b/templates/email/default/alert-problem-ward.txt
index 5e75b5948..9793bcdac 100644
--- a/templates/email/default/alert-problem-ward.txt
+++ b/templates/email/default/alert-problem-ward.txt
@@ -5,7 +5,7 @@ within <?=$values['ward_name']?>:
<?=$values['data']?>
-[% INCLUDE 'signature.txt' %]
+<?=$values['signature']?>
To stop receiving emails when there are new problems reported to
<?=$values['area_name']?> within <?=$values['ward_name']?>,
diff --git a/templates/email/default/alert-problem.txt b/templates/email/default/alert-problem.txt
index b2384a217..01e184e0a 100644
--- a/templates/email/default/alert-problem.txt
+++ b/templates/email/default/alert-problem.txt
@@ -4,7 +4,7 @@ The following new problems have been added:
<?=$values['data']?>
-[% INCLUDE 'signature.txt' %]
+<?=$values['signature']?>
To stop receiving emails when there are new problems,
please follow this link: <?=$values['unsubscribe_url']?>
diff --git a/templates/email/default/alert-update.txt b/templates/email/default/alert-update.txt
index edbb0d5f7..1140de1fa 100644
--- a/templates/email/default/alert-update.txt
+++ b/templates/email/default/alert-update.txt
@@ -11,7 +11,7 @@ To view or reply to these updates, please visit the following URL:
You cannot contact anyone by replying to this email.
-[% INCLUDE 'signature.txt' %]
+<?=$values['signature']?>
To stop receiving emails when there are new updates on this problem,
please follow this link: <?=$values['unsubscribe_url']?>
diff --git a/templates/email/default/questionnaire.txt b/templates/email/default/questionnaire.txt
index 275362d3e..88d4cc1b5 100644
--- a/templates/email/default/questionnaire.txt
+++ b/templates/email/default/questionnaire.txt
@@ -13,7 +13,7 @@ updating the status of your problem:
Please do not reply to this email; there is a public comment
box on the questionnaire.
-[% INCLUDE 'signature.txt' %]
+<?=$values['signature']?>
Your problem was as follows:
diff --git a/templates/email/default/submit-brent.txt b/templates/email/default/submit-brent.txt
index e23da8065..7936af568 100644
--- a/templates/email/default/submit-brent.txt
+++ b/templates/email/default/submit-brent.txt
@@ -29,7 +29,7 @@ Longitude: <?=$values['longitude']?>
Replies to this email will go to the user who submitted the problem.
-[% INCLUDE 'signature.txt' %]
+<?=$values['signature']?>
This message was sent via FixMyStreet, a project of UKCOD, registered charity
number 1076346. If there is a more appropriate email address for messages about
diff --git a/templates/email/default/submit.txt b/templates/email/default/submit.txt
index 118679d09..d40c5f055 100644
--- a/templates/email/default/submit.txt
+++ b/templates/email/default/submit.txt
@@ -29,7 +29,7 @@ Longitude: <?=$values['longitude']?>
Replies to this email will go to the user who submitted the problem.
-[% INCLUDE 'signature.txt' %]
+<?=$values['signature']?>
This message was sent via FixMyStreet, a project of UKCOD, registered charity
number 1076346. If there is a more appropriate email address for messages about