Skip to content

Commit

Permalink
Merge branch 'bc/send-email-use-port-as-separate-param'
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Junio C Hamano committed Jul 15, 2013
2 parents 2bb7afa + 1a741bf commit f23777c
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 @@ -1188,9 +1188,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 f23777c

Please sign in to comment.