aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/SendReport/Email.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/SendReport/Email.pm')
-rw-r--r--perllib/FixMyStreet/SendReport/Email.pm7
1 files changed, 7 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/SendReport/Email.pm b/perllib/FixMyStreet/SendReport/Email.pm
index 09847cf5f..5b0151595 100644
--- a/perllib/FixMyStreet/SendReport/Email.pm
+++ b/perllib/FixMyStreet/SendReport/Email.pm
@@ -110,6 +110,7 @@ sub send {
$params, $sender, $nomail, $cobrand, $row->lang);
unless ($result) {
+ $row->set_extra_metadata('sent_to' => email_list($params->{To}));
$self->success(1);
} else {
$self->error( 'Failed to send email' );
@@ -118,6 +119,12 @@ sub send {
return $result;
}
+sub email_list {
+ my $list = shift;
+ my @list = map { ref $_ ? $_->[0] : $_ } @$list;
+ return \@list;
+}
+
# SW&T has different contact addresses depending upon the old district
sub swandt_contact {
my $district = _get_district_for_contact(@_);