Merge branch 'bc/send-email-use-port-as-separate-param'

Pass port number as a separate argument when send-email initializes
Net::SMTP, instead of as a part of the hostname, i.e. host:port.
This allows GSSAPI codepath to match with the hostname given.

* bc/send-email-use-port-as-separate-param:
  send-email: provide port separately from hostname
This commit is contained in:
Junio C Hamano 2013-07-15 10:28:50 -07:00
commit f23777cda9

View File

@ -1188,9 +1188,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');