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>

brian m. carlson committed Jul 4, 2013 at 22:04 UTC 1a741bf73f898e6deb396dcc8b8d2d162798e616
1 file changed +4 -2
git-send-email.perl
+4 -2
@@ -1199,9 +1199,11 @@ X-Mailer: git-send-email $gitversion
1199 else {
1200 require Net::SMTP;
1201 $smtp_domain ||= maildomain();
1202 - $smtp ||= Net::SMTP->new(smtp_host_string(),
1202 + $smtp_server_port ||= 25;
1203 + $smtp ||= Net::SMTP->new($smtp_server,
1204 Hello => $smtp_domain,
1204 - Debug => $debug_net_smtp);
1205 + Debug => $debug_net_smtp,
1206 + Port => $smtp_server_port);
1207 if ($smtp_encryption eq 'tls' && $smtp) {
1208 require Net::SMTP::SSL;
1209 $smtp->command('STARTTLS');