diff options
Diffstat (limited to 'perllib/FixMyStreet')
-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 ], } ); } |