From 882dcc873146d665f2d1257b89e588ae6e6356f0 Mon Sep 17 00:00:00 2001 From: "gerv%gerv.net" <> Date: Wed, 30 Mar 2005 05:42:53 +0000 Subject: Bug 73665 - migrate email preferences to their own table, and rearchitect email internals. Patch by gerv; r=jake, a=justdave. --- contrib/sendunsentbugmail.pl | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'contrib/sendunsentbugmail.pl') diff --git a/contrib/sendunsentbugmail.pl b/contrib/sendunsentbugmail.pl index 9184e0be2..c82c0ae30 100644 --- a/contrib/sendunsentbugmail.pl +++ b/contrib/sendunsentbugmail.pl @@ -47,9 +47,22 @@ if (scalar(@list) > 0) { my $start_time = time; print "Sending mail for bug $bugid...\n"; my $outputref = Bugzilla::BugMail::Send($bugid); - my ($sent, $excluded) = (scalar(@{$outputref->{sent}}),scalar(@{$outputref->{excluded}})); - print "$sent mails sent, $excluded people excluded.\n"; - print "Took " . (time - $start_time) . " seconds.\n\n"; + if ($ARGV[0] && $ARGV[0] eq "--report") { + print "Mail sent to:\n"; + foreach (sort @{$outputref->{sent}}) { + print $_ . "\n"; + } + + print "Excluded:\n"; + foreach (sort @{$outputref->{excluded}}) { + print $_ . "\n"; + } + } + else { + my ($sent, $excluded) = (scalar(@{$outputref->{sent}}),scalar(@{$outputref->{excluded}})); + print "$sent mails sent, $excluded people excluded.\n"; + print "Took " . (time - $start_time) . " seconds.\n\n"; + } } print "Unsent mail has been sent.\n"; } -- cgit v1.2.3-24-g4f1b