From f07859aba8b3ea8868b5f18c130e74baa2d2b2c8 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 25 Aug 2014 12:05:37 +0200 Subject: [PATCH] Bug 12802: FIX use the first valid email address if noemail is needed Signed-off-by: Brendan Gallagher --- misc/cronjobs/overdue_notices.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl index a0d164c9a1..638463dcbb 100755 --- a/misc/cronjobs/overdue_notices.pl +++ b/misc/cronjobs/overdue_notices.pl @@ -730,7 +730,7 @@ END_SQL letternumber => $i, postcode => $data->{'zipcode'}, country => $data->{'country'}, - email => $notice_emails, + email => ( scalar( @emails_to_use ) ? $emails_to_use[0] : undef ), itemcount => $itemcount, titles => $titles, outputformat => defined $csvfilename ? 'csv' : defined $htmlfilename ? 'html' : defined $text_filename ? 'text' : '', -- 2.11.0