-# Copyright (C) 2018-2020 all contributors <meta@public-inbox.org>
+# Copyright (C) 2018-2021 all contributors <meta@public-inbox.org>
# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
# Unstable internal API.
# Only use Sender: if From is not present
foreach my $h (qw(From Sender)) {
- my @v = $eml->header($h);
- if (@v) {
- digest_addr($dig, $h, $_) foreach @v;
- }
+ my @v = $eml->header($h) or next;
+ digest_addr($dig, $h, $_) foreach @v;
+ last;
}
foreach my $h (qw(Subject Date)) {
my @v = $eml->header($h);