Re: [PATCH] send-email: pass smtp hostname and port to Authen::SASL
Aditya Garg <gargaditya08@live.com> writes:
[administrivia]
Please do not send patch e-mails directly at me, unless you know
that I am the area authority. Initial submissions are better
sent to the list on To: list, with area experts on Cc: if you
know or found out who they are.> 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.
The proposed log message should answer these questions as well:
What happens with version before 2.2000? Is it safe to
unconditionally add parameters like this patch does, and why?
Show 20 quoted lines
> Link: https://metacpan.org/pod/Authen::SASL::Perl::OAUTHBEARER
>
> Signed-off-by: Aditya Garg <gargaditya08@live.com>
> ---
> git-send-email.perl | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/git-send-email.perl b/git-send-email.perl
> index eed5420882..0ac4d634e8 100755
> --- a/git-send-email.perl
> +++ b/git-send-email.perl
> @@ -1474,6 +1474,8 @@ sub smtp_auth_maybe {
> user => $cred->{'username'},
> pass => $cred->{'password'},
> authname => $cred->{'username'},
> + host => $smtp_server,
> + (defined $smtp_server_port ? (port => $smtp_server_port) : ()),
> }
> );
> $result = $smtp->auth($sasl);