aboutsummaryrefslogtreecommitdiffstats
path: root/bin/send-reports
diff options
context:
space:
mode:
authormatthew <matthew>2009-08-12 13:36:00 +0000
committermatthew <matthew>2009-08-12 13:36:00 +0000
commitcfe84ab918f5d24a147fc543ec47e055255a95a2 (patch)
treebc3c97e4016c79d4390905f22b43e9423614216f /bin/send-reports
parent62b1b8f1fad9431d6a153adca50b57c6f4690ad8 (diff)
Construct email in English locale (for Date header!).
Diffstat (limited to 'bin/send-reports')
-rwxr-xr-xbin/send-reports11
1 files changed, 7 insertions, 4 deletions
diff --git a/bin/send-reports b/bin/send-reports
index cf8872604..852f20987 100755
--- a/bin/send-reports
+++ b/bin/send-reports
@@ -6,7 +6,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: matthew@mysociety.org. WWW: http://www.mysociety.org
#
-# $Id: send-reports,v 1.73 2009-08-12 13:02:46 matthew Exp $
+# $Id: send-reports,v 1.74 2009-08-12 13:36:00 matthew Exp $
use strict;
require 5.8.0;
@@ -203,15 +203,18 @@ If you know of an appropriate contact address, please do get in touch. ]\n\n";
my $result = -1;
if ($send_email) {
- my $email = mySociety::Email::construct_email({
- _template_ => _($template),
+ $template = _($template);
+ my $email = mySociety::Locale::in_gb_locale { mySociety::Email::construct_email({
+ _template_ => $template,
_parameters_ => \%h,
To => \@to,
From => [ $row->{email}, $row->{name} ],
'Message-ID' => sprintf('<report-%s-%s@mysociety.org>', time(), unpack('h*', random_bytes(5, 1))),
- });
+ }) };
if (!$nomail) {
$result *= mySociety::EmailUtil::send_email($email, mySociety::Config::get('CONTACT_EMAIL'), @recips);
+ } else {
+ print $email;
}
}