diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-05-25 17:24:12 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-05-25 17:24:12 +0100 |
commit | 8df7ff6f68edeb92e4aa8b99c0f63a1ed6487b75 (patch) | |
tree | 27c050e809f2d8519a55583509d22acb1c8b9dd8 /bin/zurich/overdue-alert | |
parent | 4ca6f431262c059ca1bb7cfe1e6188d363ca5a89 (diff) | |
parent | f92fa912ef079d28c1392c10ede73c0b072573c1 (diff) |
Merge branch '1410-email-template'
Diffstat (limited to 'bin/zurich/overdue-alert')
-rwxr-xr-x | bin/zurich/overdue-alert | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/bin/zurich/overdue-alert b/bin/zurich/overdue-alert index 0473208c5..3b312c4db 100755 --- a/bin/zurich/overdue-alert +++ b/bin/zurich/overdue-alert @@ -52,9 +52,6 @@ sub loop_through { $to_send{$row->bodies_str} .= '* ' . $row->id . ": '" . $row->title . "'\n\n"; } - my $template_path = FixMyStreet->path_to( "templates", "email", "zurich", $template )->stringify; - $template = Utils::read_file( $template_path ); - foreach my $body_id (keys %to_send) { send_alert( $template, $body_id, $to_send{$body_id}, $include_parent ); } @@ -80,14 +77,15 @@ sub send_alert { FixMyStreet::Email::send_cron( FixMyStreet::DB->storage->schema, + $template, + $h, { - _template_ => $template, - _parameters_ => $h, To => $to, From => [ FixMyStreet->config('CONTACT_EMAIL'), FixMyStreet->config('CONTACT_NAME') ], }, FixMyStreet->config('CONTACT_EMAIL'), - $nomail + $nomail, + $cobrand, 'de-ch', ); } |