aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Script/Alerts.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2016-05-25 10:18:23 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2016-05-25 10:18:23 +0100
commitf92fa912ef079d28c1392c10ede73c0b072573c1 (patch)
tree24328b22f6d3027d0d4e4eb2db734f622cca101a /perllib/FixMyStreet/Script/Alerts.pm
parenteb3cebfcda16bfda4cfe261836d756e4699041aa (diff)
Use only one templating system for emails.
Historically, emails sent offline (alerts, questionnaires, etc) used a different templating system from those sent by the website (e.g. login emails), though the newer system was also being used for the site name and signature of offline emails.
Diffstat (limited to 'perllib/FixMyStreet/Script/Alerts.pm')
-rw-r--r--perllib/FixMyStreet/Script/Alerts.pm6
1 files changed, 2 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/Script/Alerts.pm b/perllib/FixMyStreet/Script/Alerts.pm
index fc5fef953..062601044 100644
--- a/perllib/FixMyStreet/Script/Alerts.pm
+++ b/perllib/FixMyStreet/Script/Alerts.pm
@@ -248,8 +248,6 @@ sub _send_aggregated_alert_email(%) {
} );
$data{unsubscribe_url} = $cobrand->base_url( $data{cobrand_data} ) . '/A/' . $token->token;
- my $template = FixMyStreet->get_email_template($cobrand->moniker, $data{lang}, "$data{template}.txt");
-
my $sender = sprintf('<fms-%s@%s>',
FixMyStreet::Email::generate_verp_token('alert', $data{alert_id}),
FixMyStreet->config('EMAIL_DOMAIN')
@@ -257,9 +255,9 @@ sub _send_aggregated_alert_email(%) {
my $result = FixMyStreet::Email::send_cron(
$data{schema},
+ "$data{template}.txt",
+ \%data,
{
- _template_ => $template,
- _parameters_ => \%data,
To => $data{alert_email},
},
$sender,