sendEmail報錯:at /usr/share/perl5/vendor_perl/IO/Socket/SSL.pm


sendEmail發送郵件是出現以下報錯:
*******************************************************************
  Using the default of SSL_verify_mode of SSL_VERIFY_NONE  for  client
  is deprecated! Please  set  SSL_verify_mode to SSL_VERIFY_PEER
  together with SSL_ca_file|SSL_ca_path  for  verification.
  If you really don't want to verify the certificate and keep the
  connection  open  to Man-In-The-Middle attacks please  set
  SSL_verify_mode explicitly to SSL_VERIFY_NONE  in  your application.
*******************************************************************
   at  /usr/bin/sendEmail  line 1906.
invalid SSL_version specified at  /usr/share/perl5/vendor_perl/IO/Socket/SSL .pm line 415.
 

sendEmail發郵件的時候,出現的報錯,然后查閱了很多資料

 

http://caspian.dotconf.net/menu/Software/SendEmail/

上找到了 下面這段話

 

Q: I get the error "invalid SSL_version specified at /System/Library/Perl/Extras/5.16/IO/Socket/SSL.pm line 332.a on my Apple. What do I do?
A: Here's what I got from one user. It's a workaround until I put a real fix in:
> Fixed it by using Perl v5.12 that's still on OSX Mavericks. > (just changed sendEmail line 1 from #!/usr/bin/perl -w to #!/usr/bin/perl5.12 -w)

 

centos7.2默認是 perl的版本是5.16,centos6.5的是5.10,后來把7的版本換成5.10,就可以正常發郵件了。

 

#### perl安裝
      wget http: //www .cpan.org /src/5 .0 /perl-5 .10.0. tar .gz
      tar  -zxf perl-5.10.0. tar .gz
      cd  perl-5.22.0
      . /configure .gnu -des -Dprefix= /usr/local/perl
      echo  $?
      make
      make  test
      make  install
      mv  /usr/bin/perl  /usr/bin/perl .bak
      ln  -s  /usr/local/perl/bin/perl  /usr/bin/perl
      perl - v
 
本文出自 “ 何全” 博客,請務必保留此出處 http://hequan.blog.51cto.com/5701886/1811246


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM