diff options
author | Dave Arter <davea@mysociety.org> | 2016-07-28 16:53:56 +0100 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2016-07-28 16:53:56 +0100 |
commit | 14aaf6fafaa9aa8736f49851e95fa2c3c566c056 (patch) | |
tree | fc1afeae6c1e82494044465cbf99a3ffdb893141 /perllib/FixMyStreet | |
parent | 07d2c0f3e4b94ec8824a6f592dc586d71392db20 (diff) |
[Zurich] Send admin emails from the do-not-reply address
Also takes the opportunity to fix the incorrectly-encoded sender name which
was appearing to some clients as "Züri Wie Neu".
Diffstat (limited to 'perllib/FixMyStreet')
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Zurich.pm | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Zurich.pm b/perllib/FixMyStreet/Cobrand/Zurich.pm index 1bf9cb9a5..cc40cde29 100644 --- a/perllib/FixMyStreet/Cobrand/Zurich.pm +++ b/perllib/FixMyStreet/Cobrand/Zurich.pm @@ -994,10 +994,9 @@ 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? + my $sender = FixMyStreet->config('DO_NOT_REPLY_EMAIL'); + my $sender_name = $c->cobrand->contact_name; + utf8::decode($sender_name) unless utf8::is_utf8($sender_name); $c->send_email( $template, { to => [ $to ], |