Jonathan Nieder <[email protected]> writes:
> Subject: send-email: Net::SMTP::starttls was introduced in v3.01
>
> We cannot rely on the starttls method being present in the copy
> of Net::SMTP shipped with perl until v5.21.5~169 (Update libnet to
> CPAN version 3.01, 2014-10-10).
>
> Reported-by: Brandon Williams <[email protected]>
> Reported-by: Eric Biggers <[email protected]>
> Signed-off-by: Jonathan Nieder <[email protected]>
> ---
> Hi Eric,
>
> Eric Biggers wrote:
>
>> There seems to be a bug in 'git send-email' caused by this commit:
>>
>> commit 0ead000c3aca13a10ae51a3c74c866981e0d33b8
>> Author: Dennis Kaarsemaker <[email protected]>
>> Date: Fri Mar 24 22:37:32 2017 +0100
>>
>> send-email: Net::SMTP::SSL is obsolete, use only when necessary
>>
>> When running git send-email I get the following error:
>>
>> Can't locate object method "starttls" via package "Net::SMTP" at
>> /usr/lib/git-core/git-send-email line 1410.
>>
>> The perl version is 5.18.2, and the Net::SMTP version is 2.31.
>
> Thanks for reporting. Does this patch help?
Good, you beat me to it ;-) Once we get this confirmed, let's queue
an emergency fix.
Thanks.
>
> Regards,
> Jonathan
>
> git-send-email.perl | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/git-send-email.perl b/git-send-email.perl
> index 0d90439d9..3441e3cf5 100755
> --- a/git-send-email.perl
> +++ b/git-send-email.perl
> @@ -1354,7 +1354,7 @@ EOF
> }
>
> require Net::SMTP;
> - my $use_net_smtp_ssl = version->parse($Net::SMTP::VERSION) <
> version->parse("1.28");
> + my $use_net_smtp_ssl = version->parse($Net::SMTP::VERSION) <
> version->parse("3.01");
> $smtp_domain ||= maildomain();
>
> if ($smtp_encryption eq 'ssl') {