Skip to content

Commit

Permalink
send-email: rfc822 forbids using <address@domain> without a non-empty…
Browse files Browse the repository at this point in the history
… "phrase"

Email::Valid does respect this considering such a mailbox specification
invalid.  b06c6bc addressed the issue, but
only if Email::Valid is available.

Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Uwe Kleine-König authored and Junio C Hamano committed Aug 10, 2007
1 parent cabead9 commit 155197e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git-send-email.perl
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,8 @@ sub extract_valid_address {
# check for a local address:
return $address if ($address =~ /^($local_part_regexp)$/);

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

0 comments on commit 155197e

Please sign in to comment.