Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

I have the usual headache when trying to send an email from Perl which requires TLS. I'm running Strawberry Perl on a Windows7 machine, and I'm running code that works on other Windows PCs (in the past), so it is basically a configuration issue rather than basic coding, but it is an issue I see happening to other guys quite a bit. I recall in the past I always had problems getting this to run on those PCs also. The code is basically:

$email = new Net::SMTP::TLS($account_smtp,Hello=>$account_smtp, Port=>25,User=>$account_user,Password=>$account_pass);

So the accounts and passwords are correct, as that works on another machine in the company. The initial error I got was: invalid SSL_version specified at C:/strawberry/perl/vendor/lib/IO/Socket/SSL.pm line 418

But I applied the following workaround to C:\strawberry\perl\vendor\lib\Crypt\SSLeay\SSL.pm line 1602:

# old code m{^(!?)(?:(SSL(?:v2|v3|v23|v2/3))|(TLSv1[12]?))$}i # new code m{^(!?)(?:(SSL(?:v2|v3|v23|v2/3))|(TLSv1[12]?))}i

That now seems to work, but I get the following error further down the line: Couldn't start TLS: SSL connect attempt failed with unknown error error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

I also tried updating Crypt::SSLeay in case it was old:

cpan> install Crypt::SSLeay Fetching with LWP: http://cpan.strawberryperl.com/authors/01mailrc.txt.gz Fetching with LWP: http://cpan.strawberryperl.com/modules/02packages.details.txt.gz Fetching with LWP: http://cpan.strawberryperl.com/modules/03modlist.data.gz Database was generated on Thu, 19 Dec 2013 14:05:27 GMT Updating database file ... Done! Crypt::SSLeay is up to date (0.64).

But that made no difference, has anyone got any ideas ?


In reply to 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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2024-03-28 12:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found