diff options
author | Steven Day <steve@mysociety.org> | 2014-10-21 15:23:00 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2014-12-09 17:25:07 +0000 |
commit | 819bac8ab6fa16fc260efb953db15c758dbc7109 (patch) | |
tree | 3720686f9ec17fcbbc1535b863882168bf3894c2 /perllib/FixMyStreet/SendReport | |
parent | 3cc44ea196e7c72733e832b2dafaf467eb622824 (diff) |
Pass cobrand into send_email_cron when sending SendReport emails
Without this, email sending within a cobrand will get the right main
email template (submit.txt) for the email - because it uses the
cobrand inside get_template - but it doesn't use the cobrand for
things like the email signature, because you have to pass it into
send_email_cron manually to make it cobrand-aware.
This probably hasn't been noticed before because most cobrands are
called Something FixMyStreet, but Collideoscope is different and hence
it caused a problem there.
Closes mysociety/FixMyStreet-Commercial#621.
Diffstat (limited to 'perllib/FixMyStreet/SendReport')
-rw-r--r-- | perllib/FixMyStreet/SendReport/Email.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/SendReport/Email.pm b/perllib/FixMyStreet/SendReport/Email.pm index 2eb6bc279..19c6405d2 100644 --- a/perllib/FixMyStreet/SendReport/Email.pm +++ b/perllib/FixMyStreet/SendReport/Email.pm @@ -89,6 +89,7 @@ sub send { } my ($verbose, $nomail) = CronFns::options(); + my $cobrand = FixMyStreet::Cobrand->get_class_for_moniker($row->cobrand)->new(); my $result = FixMyStreet::App->send_email_cron( { _template_ => $self->get_template( $row ), @@ -98,7 +99,8 @@ sub send { }, mySociety::Config::get('CONTACT_EMAIL'), \@recips, - $nomail + $nomail, + $cobrand ); if ( $result == mySociety::EmailUtil::EMAIL_SUCCESS ) { |