[prev in list] [next in list] [prev in thread] [next in thread]
List: git
Subject: Re: [PATCH] send-email: Net::SMTP::SSL is obsolete, use only when necessary
From: Dennis Kaarsemaker <dennis () kaarsemaker ! net>
Date: 2017-03-18 23:14:23
Message-ID: 1489878863.24742.3.camel () kaarsemaker ! net
[Download RAW message or body]
On Sat, 2017-03-18 at 23:47 +0100, Ævar Arnfjörð Bjarmason wrote:
> On Sat, Mar 18, 2017 at 11:23 PM, Dennis Kaarsemaker
> <dennis@kaarsemaker.net> wrote:
>
> > + require Net::SMTP;
> > + my $use_net_smtp_ssl = $Net::SMTP::VERSION lt "1.28";
> > + $smtp_domain ||= maildomain();
> > +
>
> While Net::SMTP is unlikely to change its versioning scheme, let's use
> comparisons via the version module here in case they do change it to
> something silly, and this ends up introducing a bug.
ok.
> > [...]
> > + if ($smtp->code != 220) {
> > + die sprintf(__("Server does not \
> > support STARTTLS! %s"), $smtp->message);
>
> Here a new message you're adding gets __(), makes sense.
Didn't add it, it just moved from a bit further below :)
> > + else {
> > + $smtp->starttls(ssl_verify_params())
> > + or die "STARTTLS failed! \
> > ".IO::Socket::SSL::errstr(); + }
>
> I see you just copied that from above but I wonder if it makes sense
> to just mark both occurrences with __() too while we're at it.
ok.
D.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic