aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App.pm
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2011-06-02 18:45:26 +0100
committerStruan Donald <struan@exo.org.uk>2011-06-02 18:45:26 +0100
commitc848e3bfba1ec644805c0e8b0a24c3a968d7ec3b (patch)
tree25e4b77f5b0ff3ccdce1896b30c619f3d3e0b1a6 /perllib/FixMyStreet/App.pm
parent040e507c4e0be26c777ca21c06f1cb45c17749f3 (diff)
parent53455ab83400aeeae9341cd720eef9fae53af221 (diff)
Merge branch 'migrate_to_catalyst' of ssh://git.mysociety.org/data/git/public/fixmystreet into migrate_to_catalyst
Diffstat (limited to 'perllib/FixMyStreet/App.pm')
-rw-r--r--perllib/FixMyStreet/App.pm13
1 files changed, 8 insertions, 5 deletions
diff --git a/perllib/FixMyStreet/App.pm b/perllib/FixMyStreet/App.pm
index 1d584accb..752263d10 100644
--- a/perllib/FixMyStreet/App.pm
+++ b/perllib/FixMyStreet/App.pm
@@ -278,8 +278,10 @@ sub send_email {
from => FixMyStreet->config('CONTACT_EMAIL'),
%{ $c->stash },
%$extra_stash_values,
- additional_template_paths =>
- [ $c->cobrand->path_to_email_templates->stringify ]
+ additional_template_paths => [
+ FixMyStreet->path_to( 'templates', 'email', $c->cobrand->moniker, $c->stash->{lang_code} )->stringify,
+ FixMyStreet->path_to( 'templates', 'email', $c->cobrand->moniker )->stringify,
+ ]
};
# render the template
@@ -292,12 +294,13 @@ sub send_email {
# pass the email into mySociety::Email to construct the on the wire 7bit
# format - this should probably happen in the transport instead but hohum.
- my $email_text = mySociety::Email::construct_email(
+ my $email_text = mySociety::Locale::in_gb_locale { mySociety::Email::construct_email(
{
- _unwrapped_body_ => $email->body, # will get line wrapped
+ _template_ => $email->body, # will get line wrapped
+ _parameters_ => {},
$email->header_pairs
}
- );
+ ) };
# send the email
$c->model('EmailSend')->send($email_text);