From 448418e0908a026c95ccdca33e5b2b7bb71890b8 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 e32aa7f..4806f71 100755 --- a/misc/cronjobs/overdue_notices.pl +++ b/misc/cronjobs/overdue_notices.pl @@ -718,7 +718,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' : '', -- 1.7.10.4