Skip to content

Commit

Permalink
Item15162: fixed error parsing an empty header
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDaum committed Aug 2, 2022
1 parent 73a9b44 commit 3a85c6a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions core/lib/Foswiki/Net.pm
Original file line number Diff line number Diff line change
Expand Up @@ -659,9 +659,10 @@ sub _sendEmailByNetSMTP {

# Remove names part from addresses. I.e. convert "John Smith <jsmith@nowhere.com>"
# to just jsmith@nowhere.com
push @to,
map { $_->address }
Email::Address::XS->parse( $header->header_raw($field) );
my $str = $header->header_raw($field);
next unless $str;

push @to, map { $_->address } Email::Address::XS->parse($str);
}

if ( !( scalar(@to) ) ) {
Expand Down

0 comments on commit 3a85c6a

Please sign in to comment.