Skip to content

Commit

Permalink
send-email: provide port separately from hostname
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
brian m. carlson authored and Junio C Hamano committed Jul 5, 2013
1 parent 81a199b commit 1a741bf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions git-send-email.perl
Original file line number Diff line number Diff line change
Expand Up @@ -1199,9 +1199,11 @@ sub send_message {
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');
Expand Down

0 comments on commit 1a741bf

Please sign in to comment.