diff options
author | Matthew Somerville <matthew@mysociety.org> | 2013-02-08 12:09:27 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2013-02-08 12:09:27 +0000 |
commit | e3bce6312ed59ccd462cae69d214efdb1c19cbbc (patch) | |
tree | 35f1cbfe446efaa44cb1b04707c733f2c8a03f37 /perllib | |
parent | 599ff08d1b9e961b97b4fd94f52d6125033d208d (diff) |
Send updates to user from body email address (fixes a2a).
Diffstat (limited to 'perllib')
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Zurich.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Zurich.pm b/perllib/FixMyStreet/Cobrand/Zurich.pm index 57181887f..9732e5329 100644 --- a/perllib/FixMyStreet/Cobrand/Zurich.pm +++ b/perllib/FixMyStreet/Cobrand/Zurich.pm @@ -444,9 +444,15 @@ sub _admin_send_email { ? [ $problem->user->email, $problem->name ] : $problem->user->email; + # Similar to what SendReport::Zurich does to find address to send to + my $body = ( values %{$problem->bodies} )[0]; + my $sender = $body->endpoint || $c->cobrand->contact_email; + my $sender_name = $c->cobrand->contact_name; # $body->name? + $c->send_email( $template, { to => [ $to ], url => $c->uri_for_email( $problem->url ), + from => [ $sender, $sender_name ], } ); } |