diff options
-rwxr-xr-x | script/public-inbox-learn | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/script/public-inbox-learn b/script/public-inbox-learn index c4c4d4b9..8ff1652b 100755 --- a/script/public-inbox-learn +++ b/script/public-inbox-learn @@ -42,9 +42,11 @@ my $mime = PublicInbox::MIME->new(eval { # get all recipients my %dests; foreach my $h (qw(Cc To)) { - my $val = $mime->header($h) or next; - foreach my $email (PublicInbox::Address::emails($val)) { - $dests{lc($email)} = 1; + my @val = $mime->header($h) or next; + for (@val) { + foreach my $email (PublicInbox::Address::emails($_)) { + $dests{lc($email)} = 1; + } } } |