Re: [PATCH] send-email: Net::SMTP::SSL is obsolete, use only when necessary
On Sat, 2017-03-18 at 23:47 +0100, Ævar Arnfjörð Bjarmason wrote:
Show 11 quoted lines
> 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.
Show 5 quoted lines
> > [...]
> > + 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 :)
Show 7 quoted lines
> > + 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.