lib/PublicInbox/Feed.pm | 2 +- lib/PublicInbox/MDA.pm | 2 -- lib/PublicInbox/View.pm | 1 - diff --git a/lib/PublicInbox/Feed.pm b/lib/PublicInbox/Feed.pm index 51216aaa1c28943cf396fffeaaa9b9dace0770ee..f4d19e0208d1355101e8e03cd521b99b6c568b8f 100644 --- a/lib/PublicInbox/Feed.pm +++ b/lib/PublicInbox/Feed.pm @@ -279,7 +279,7 @@ $title = PublicInbox::Hval->new_oneline($title)->as_html; my $type = index($title, '&') >= 0 ? "\ntype=\"html\"" : ''; my $from = mime_header($header_obj, 'From') or return 0; - my @from = Email::Address->parse($from); + my @from = Email::Address->parse($from) or return 0; my $name = PublicInbox::Hval->new_oneline($from[0]->name)->as_html; my $email = $from[0]->address; $email = PublicInbox::Hval->new_oneline($email)->as_html; diff --git a/lib/PublicInbox/MDA.pm b/lib/PublicInbox/MDA.pm index fe04ded9ea737d4d8788e1d4be8c1be52e9ab66a..16da7afac2bb8a6f357f57b79db41bf8c86911af 100644 --- a/lib/PublicInbox/MDA.pm +++ b/lib/PublicInbox/MDA.pm @@ -88,9 +88,7 @@ my $from = $mime->header('From'); my @from = Email::Address->parse($from); my $name = $from[0]->name; - defined $name or $name = ''; my $email = $from[0]->address; - defined $email or $email = ''; ($name, $email, $mime->header('Date')); } diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index fe37a9fc618e8e68d95bcdfa2bd0cf9cdf8426b1..f4e7282697ef1001252c2b68e6a498a269ab6f6d 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -65,7 +65,6 @@ my $mid = PublicInbox::Hval->new_msgid($mid_raw); my $from = PublicInbox::Hval->new_oneline($mime->header('From'))->raw; my @from = Email::Address->parse($from); $from = $from[0]->name; - (defined($from) && length($from)) or $from = $from[0]->address; $from = PublicInbox::Hval->new_oneline($from)->as_html; $subj = PublicInbox::Hval->new_oneline($subj)->as_html;