return $address if ($address =~ /^($local_part_regexp)$/);
if ($have_email_valid) {
- $address =~ s/^<(.*)>$/$1/;
+ $address =~ s/^\s*<(.*)>\s*$/$1/;
return scalar Email::Valid->address($address);
} else {
# less robust/correct than the monster regexp in Email::Valid,