summaryrefslogtreecommitdiff
path: root/git-send-email.perl
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2013-07-04 22:04:52 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-07-05 04:40:37 (GMT)
commit1a741bf73f898e6deb396dcc8b8d2d162798e616 (patch)
treeffddc20d6ee8e2fbadfaacc2ec3d0e11037b761c /git-send-email.perl
parent81a199bb1cd483321962a7bfe5db33980bbf0f01 (diff)
downloadgit-1a741bf73f898e6deb396dcc8b8d2d162798e616.zip
git-1a741bf73f898e6deb396dcc8b8d2d162798e616.tar.gz
git-1a741bf73f898e6deb396dcc8b8d2d162798e616.tar.bz2
send-email: provide port separately from hostname
If the SMTP port is provided as part of the hostname to Net::SMTP, it passes the combined string to the SASL provider; this causes GSSAPI authentication to fail since Kerberos does not want the port information. Instead, pass the port as a separate argument as is done for SSL connections. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-send-email.perl')
-rwxr-xr-xgit-send-email.perl6
1 files changed, 4 insertions, 2 deletions
diff --git a/git-send-email.perl b/git-send-email.perl
index bd13cc8..ca86a13 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -1199,9 +1199,11 @@ X-Mailer: git-send-email $gitversion
else {
require Net::SMTP;
$smtp_domain ||= maildomain();
- $smtp ||= Net::SMTP->new(smtp_host_string(),
+ $smtp_server_port ||= 25;
+ $smtp ||= Net::SMTP->new($smtp_server,
Hello => $smtp_domain,
- Debug => $debug_net_smtp);
+ Debug => $debug_net_smtp,
+ Port => $smtp_server_port);
if ($smtp_encryption eq 'tls' && $smtp) {
require Net::SMTP::SSL;
$smtp->command('STARTTLS');