Skip to content

Commit b10fb23

Browse files
AdityaGarg8gitster
authored andcommitted
send-email: pass smtp hostname and port to Authen::SASL
Starting from version 2.2000, Authen::SASL supports passing the SMTP server hostname and port to the OAUTHBEARER string passed via SMTP AUTH. Add support for the same in git-send-email. It's safe to add the new parameters unconditionally as older versions of Authen::SASL will simply ignore them without any error. Something similar is already being done for the authname parameter, which is not supported by every authentication mechanism. This can be understood as declaring a variable but not using at all. Link: https://metacpan.org/pod/Authen::SASL::Perl::OAUTHBEARER Signed-off-by: Aditya Garg <gargaditya08@live.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 795c338 commit b10fb23

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

git-send-email.perl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1474,6 +1474,8 @@ sub smtp_auth_maybe {
14741474
user => $cred->{'username'},
14751475
pass => $cred->{'password'},
14761476
authname => $cred->{'username'},
1477+
host => $smtp_server,
1478+
(defined $smtp_server_port ? (port => $smtp_server_port) : ()),
14771479
}
14781480
);
14791481
$result = $smtp->auth($sasl);

0 commit comments

Comments
 (0)