All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Wong <e@80x24.org>
To: Todd Zullinger <tmz@pobox.com>
Cc: Chris Mayo <aklhfex@gmail.com>,
	Jonathan Nieder <jrnieder@gmail.com>,
	Dennis Kaarsemaker <dennis@kaarsemaker.net>,
	git@vger.kernel.org
Subject: Re: [PATCH] send-email: remove documented requirement for Net::SMTP::SSL
Date: Tue, 28 May 2019 01:31:28 +0000	[thread overview]
Message-ID: <20190528013128.ynvvci4ul2exiyef@dcvr> (raw)
In-Reply-To: <20190528000544.GX3654@pobox.com>

Todd Zullinger <tmz@pobox.com> wrote:
> I wonder if it's (separately from this change) worth
> adjusting the conditional which sets $use_net_smtp_ssl to
> use "Net::SMTP->can('starttls')" rather than a strict
> version check?  (It might not be if using 'can' is too
> fragile or would only benefit the Red Hat 7 packages which
> likely won't officially be updated to a newer git with such
> a change.)
> 
> Something like:
> 
> diff --git i/git-send-email.perl w/git-send-email.perl
> index 24859a7bc3..84ac03994d 100755
> --- i/git-send-email.perl
> +++ w/git-send-email.perl
> @@ -1465,7 +1465,7 @@ sub send_message {
>  		}
>  
>  		require Net::SMTP;
> -		my $use_net_smtp_ssl = version->parse($Net::SMTP::VERSION) < version->parse("2.34");
> +		my $use_net_smtp_ssl = Net::SMTP->can('starttls') ? 0 : 1;
>  		$smtp_domain ||= maildomain();
>  
>  		if ($smtp_encryption eq 'ssl') {

Looks much better to me.

  reply	other threads:[~2019-05-28  1:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-26 17:22 [PATCH] send-email: remove documented requirement for Net::SMTP::SSL Chris Mayo
2019-05-27 19:35 ` Eric Wong
2019-05-27 20:36   ` Ævar Arnfjörð Bjarmason
2019-05-27 23:43     ` brian m. carlson
2019-05-28  2:17       ` Ævar Arnfjörð Bjarmason
2019-05-28  1:22     ` Eric Wong
2019-05-28  0:05   ` Todd Zullinger
2019-05-28  1:31     ` Eric Wong [this message]
2019-05-28  1:43       ` Ævar Arnfjörð Bjarmason
2019-05-28  1:56         ` Todd Zullinger
2019-05-28  1:57         ` Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190528013128.ynvvci4ul2exiyef@dcvr \
    --to=e@80x24.org \
    --cc=aklhfex@gmail.com \
    --cc=dennis@kaarsemaker.net \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=tmz@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.