send-email: rfc822 forbids using <address@domain> without a non-empty "phrase"
Email::Valid does respect this considering such a mailbox specification invalid. b06c6bc831cbb9e9eb82fd3ffd5a2b674cd940d0 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>
Uwe Kleine-König committed
Aug 9, 2007 at 15:27 UTC
155197e6e770599a5ed7a33a33f2916032184dd3
1 file changed
+1
-1
git-send-email.perl
+1
-1
@@ -408,8 +408,8 @@ sub extract_valid_address {
408
# check for a local address:
409
return $address if ($address =~ /^($local_part_regexp)$/);
410
411
+ $address =~ s/^\s*<(.*)>\s*$/$1/;
412
if ($have_email_valid) {
412
- $address =~ s/^\s*<(.*)>\s*$/$1/;
413
return scalar Email::Valid->address($address);
414
} else {
415
# less robust/correct than the monster regexp in Email::Valid,