diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-05-25 10:18:23 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-05-25 10:18:23 +0100 |
commit | f92fa912ef079d28c1392c10ede73c0b072573c1 (patch) | |
tree | 24328b22f6d3027d0d4e4eb2db734f622cca101a /bin | |
parent | eb3cebfcda16bfda4cfe261836d756e4699041aa (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 'bin')
-rwxr-xr-x | bin/handlemail | 3 | ||||
-rwxr-xr-x | bin/zurich/overdue-alert | 10 |
2 files changed, 5 insertions, 8 deletions
diff --git a/bin/handlemail b/bin/handlemail index 55a053963..cc671f786 100755 --- a/bin/handlemail +++ b/bin/handlemail @@ -170,8 +170,7 @@ sub handle_non_bounce_to_null_address { my $mail = FixMyStreet::Email::construct_email({ From => [ FixMyStreet->config('CONTACT_EMAIL'), 'FixMyStreet' ], To => $data{return_path}, - _template_ => $template, - _parameters_ => { }, + _body_ => $template, }); send_mail($mail->as_string, '<>', $data{return_path}); } 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', ); } |