aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet
diff options
context:
space:
mode:
authorEdmund von der Burg <evdb@mysociety.org>2011-03-03 09:05:44 +0000
committerEdmund von der Burg <evdb@mysociety.org>2011-03-03 09:05:44 +0000
commitc47cfe2bdd85b1561b57a5bccad9a1512af1f1bb (patch)
tree92286ee54a8485855cd935751a515542aaa5690e /perllib/FixMyStreet
parent20fe27a76cd5ba8d912024f40c6ea881791623b0 (diff)
Check that UTF8 in emails works
Diffstat (limited to 'perllib/FixMyStreet')
-rw-r--r--perllib/FixMyStreet/App.pm3
-rw-r--r--perllib/FixMyStreet/App/View/Email.pm1
-rw-r--r--perllib/FixMyStreet/App/View/Web.pm1
3 files changed, 5 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App.pm b/perllib/FixMyStreet/App.pm
index f5d2f7d62..3e3c9c8a8 100644
--- a/perllib/FixMyStreet/App.pm
+++ b/perllib/FixMyStreet/App.pm
@@ -184,6 +184,9 @@ sub send_email {
$email->header_set( ucfirst($_), $vars->{$_} )
for grep { $vars->{$_} } qw( to from subject);
+ # always send utf8 emails
+ $email->header_set( 'Content-Type' => 'text/plain; charset="utf-8"' );
+
# send the email
$c->model('EmailSend')->send($email);
diff --git a/perllib/FixMyStreet/App/View/Email.pm b/perllib/FixMyStreet/App/View/Email.pm
index 646615d36..fa46623eb 100644
--- a/perllib/FixMyStreet/App/View/Email.pm
+++ b/perllib/FixMyStreet/App/View/Email.pm
@@ -12,6 +12,7 @@ __PACKAGE__->config(
INCLUDE_PATH => [ #
FixMyStreet->path_to( 'templates', 'email', 'default' ),
],
+ ENCODING => 'utf8',
render_die => 1,
expose_methods => ['loc'],
);
diff --git a/perllib/FixMyStreet/App/View/Web.pm b/perllib/FixMyStreet/App/View/Web.pm
index 1c6d73ca7..9c16e0d84 100644
--- a/perllib/FixMyStreet/App/View/Web.pm
+++ b/perllib/FixMyStreet/App/View/Web.pm
@@ -12,6 +12,7 @@ __PACKAGE__->config(
INCLUDE_PATH => [ #
FixMyStreet->path_to( 'templates', 'web', 'default' ),
],
+ ENCODING => 'utf8',
render_die => 1,
expose_methods => ['loc'],
);