]> git.ipfire.org Git - thirdparty/git.git/commitdiff
send-email: provide port separately from hostname
authorbrian m. carlson <sandals@crustytoothpaste.net>
Thu, 4 Jul 2013 22:04:52 +0000 (22:04 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 5 Jul 2013 04:40:37 +0000 (21:40 -0700)
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>
git-send-email.perl

index bd13cc812d2a0115edcdd2c3ec146665ddfc5e29..ca86a1391d49397289e2d3f0fcb644f479070ac3 100755 (executable)
@@ -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');