diff --git a/scripts/send-renewal-notices.plx b/scripts/send-renewal-notices.plx index 5673400..69f9346 100644 --- a/scripts/send-renewal-notices.plx +++ b/scripts/send-renewal-notices.plx @@ -120,7 +120,7 @@ foreach my $supporterId (sort @supporterIds) { my $displayName = $sp->getDisplayName($supporterId); if ($isPaper) { - next unless $sp->paperMailOk($donorId); + next unless $sp->paperMailOk($supporterId); my $latexDisplayName = latex_encode($displayName); $latexDisplayName =~ s/\\unmatched\{0141\}/\L{}/g; $latexDisplayName =~ s/\\unmatched\{0142\}/\l{}/g; @@ -159,7 +159,7 @@ foreach my $supporterId (sort @supporterIds) { close LETTER; close MESSAGE; } else { - next unless $sp->emailOk($donorId); + next unless $sp->emailOk($supporterId); open(MESSAGE, "<", $EMAIL_TEMPLATE); my @message; while (my $line = ) {