git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[BUG] git-send-email broken: Can't locate object method "starttls"

From
EBEric Biggers <ebiggers3@gmail.com>
Date
May 31, 2017, 22:24 UTC
Message-ID
<20170531222455.GD72735@gmail.com>
Hi,
There seems to be a bug in 'git send-email' caused by this commit:
    commit 0ead000c3aca13a10ae51a3c74c866981e0d33b8
    Author: Dennis Kaarsemaker <dennis@kaarsemaker.net>
    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.

I suspect the following line of code which appears to assume that starttls() is present in Net::SMTP >= 1.28:

	my $use_net_smtp_ssl = version->parse($Net::SMTP::VERSION) < version->parse("1.28");

... but in fact it appears to have been added by the following commit to perl, which bumped the Net::SMTP version from 2.34 up to 3.01:

	https://perl5.git.perl.org/perl.git/commit/2e1731446cd265cddae2ea6c43a375168fdb6f56
Eric
Next: Jonathan Nieder
Message 1 of 6 in “[BUG] git-send-email broken: Can't locate object method "starttls"”
  1. Eric BiggersMay 31, 2017
  2. send-email: Net::SMTP::starttls was introduced in v3.01 (Re: [BUG] git-send-email broken: Can't locate object method "starttls")Jonathan Nieder, May 31, 2017
  3. Junio C HamanoMay 31, 2017
  4. Eric BiggersMay 31, 2017
  5. Jonathan NiederMay 31, 2017
  6. send-email: Net::SMTP::starttls was introduced in v2.34 (Re: [BUG] git-send-email broken: Can't locate object method "starttls")Jonathan Nieder, Jun 1, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.