Re: [PATCH] send-email: Net::SMTP::starttls was introduced in v3.01 (Re: [BUG] git-send-email broken: Can't locate object method "starttls")

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 31, 2017 at 03:44:15PM -0700, Jonathan Nieder wrote:
> 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 <bmwill@xxxxxxxxxx>
> Reported-by: Eric Biggers <ebiggers3@xxxxxxxxx>
> Signed-off-by: Jonathan Nieder <jrnieder@xxxxxxxxx>
> ---
> Hi Eric,
> 
> Eric Biggers wrote:
> 
> > There seems to be a bug in 'git send-email' caused by this commit:
> >
> >     commit 0ead000c3aca13a10ae51a3c74c866981e0d33b8
> >     Author: Dennis Kaarsemaker <dennis@xxxxxxxxxxxxxxx>
> >     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?
> 
> 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') {
> -- 

Yes, that solves the problem for me.

Eric



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]