Skip to content

Commit f23777c

Browse files
committed
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
2 parents 2bb7afa + 1a741bf commit f23777c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

git-send-email.perl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,9 +1188,11 @@ sub send_message {
11881188
else {
11891189
require Net::SMTP;
11901190
$smtp_domain ||= maildomain();
1191-
$smtp ||= Net::SMTP->new(smtp_host_string(),
1191+
$smtp_server_port ||= 25;
1192+
$smtp ||= Net::SMTP->new($smtp_server,
11921193
Hello => $smtp_domain,
1193-
Debug => $debug_net_smtp);
1194+
Debug => $debug_net_smtp,
1195+
Port => $smtp_server_port);
11941196
if ($smtp_encryption eq 'tls' && $smtp) {
11951197
require Net::SMTP::SSL;
11961198
$smtp->command('STARTTLS');

0 commit comments

Comments
 (0)