aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Email.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2016-09-16 17:58:16 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2016-09-20 17:18:35 +0100
commit148d702917f54327f82e49fe605e5a0d9f2e31ca (patch)
tree465574714026090bda8301a655a1176c5323d426 /perllib/FixMyStreet/Email.pm
parent99abfad00e301e3a261820db0d54470d9c4ef10c (diff)
Use shared Template base for all templates.
Reduce some duplicated code, and as a side effect gives HTML emails our internal html_para filter, allowing single line returns in contact form submissions.
Diffstat (limited to 'perllib/FixMyStreet/Email.pm')
-rw-r--r--perllib/FixMyStreet/Email.pm5
1 files changed, 2 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/Email.pm b/perllib/FixMyStreet/Email.pm
index 34ac1514c..7d81c9dc5 100644
--- a/perllib/FixMyStreet/Email.pm
+++ b/perllib/FixMyStreet/Email.pm
@@ -10,7 +10,7 @@ use Email::MIME;
use Encode;
use File::Spec;
use POSIX qw();
-use Template;
+use FixMyStreet::Template;
use Digest::HMAC_SHA1 qw(hmac_sha1_hex);
use mySociety::Locale;
use mySociety::Random qw(random_bytes);
@@ -162,8 +162,7 @@ sub send_cron {
my $html_template = get_html_template($template, @include_path);
push @include_path, FixMyStreet->path_to( 'templates', 'email', 'default' );
- my $tt = Template->new({
- ENCODING => 'utf8',
+ my $tt = FixMyStreet::Template->new({
INCLUDE_PATH => \@include_path,
});
$vars->{signature} = _render_template($tt, 'signature.txt', $vars);