Patching Crypt::SSLeay should not help because Net::SMTP::TLS uses IO::Socket::SSL which uses Net::SSLeay and not Crypt::SSLeay. But contrary to your description your change applies to IO::Socket::SSL and not Crypt::SSLeay, so it works a bit even if the general approach is wrong. The real problem is that Net::SMTP::TLS uses SSL_version in a wrong and never documented way and thus broke once the version check was done more strict (and the intended version string never did what the author tried to do). The problem you run into is known for several years (rt#77400) but the package is not changed since 2006 so it will probably never be fixed.

I would recommend you to just use Net::SSLGlue::SMTP, which patches the core module Net::SMTP to provide TLS support. You'll probably need to specify a SSL_ca_file or SSL_ca_path to specify where your CA are, or if you don't care at all about security you could set SSL_verify_mode to 0 (but in this case you should ask yourself why you use TLS at all).


In reply to Re: Couldn't start TLS: SSL connect attempt failed with unknown error error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed by noxxi
in thread Couldn't start TLS: SSL connect attempt failed with unknown error error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed by rich101v2

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.