系统环境
CentOS Linux release 7.2.1511 (Core)

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.

问题原因:
SSL.pm文件415行

${*$self}{'_SSL_ctx'} = IO::Socket::SSL::SSL_Context->new($arg_hash) || return;

# perl -v

This is perl 5, version 16, subversion 3 (v5.16.3) built for x86_64-linux-thread-multi
(with 29 registered patches, see perl -V for more detail)

由于在CentOS 7下perl的版本为5.16,而centos6.5的是5.10,版本不兼容

解决方法:
a、卸载现有的perl版本,安装老版本(不推荐)
b、增加参数-o tls=no 选项
# /usr/local/bin/sendEmail -f kogcenter@163.com -s smtp.163.com -xu kogcenter@163.com -xp 123456 -t jacket@qq.com -u "test mail" -m "test mail" -o tls=no
Apr 27 14:55:16 server sendEmail[185679]: Email was sent successfully!

CentOS 7 下sendEmail发邮件失败,提示invalid SSL_version specified at /usr/share/perl5/vendor_perl/IO/Socket/SSL.pm line 415.的更多相关文章

  1. sendEmail报错:at /usr/share/perl5/vendor_perl/IO/Socket/SSL.pm

    sendEmail发送邮件是出现以下报错: *******************************************************************  Using the ...

  2. 使用phpmailer插件发邮件失败提示:SMTP -> ERROR: Failed to connect to server: Connection timed out (110) smtp connect() failed;

    一个邮件发送问题,整整弄了我一周时间,起因是这样的,之前弄的一个网站,需要在邮箱里面认证之后才可以注册成功.网站上线了差不多一年之后,客户突然跟我说,网站不能注册了,然后我就查看了一下代码. 发现报这 ...

  3. CentOS6.4 利用sendEmail发邮件

    1.下载安装sendEmail wget http://caspian.dotconf.net/menu/Software/SendEmail/sendEmail-v1.56.tar.gz tar z ...

  4. 解决升级PHP7.1后,发邮件时提示“fsockopen(): Peer certificate CN=`xxx.xx.com' did not match expected CN=`113.x.xx.98”

    把项目环境升级到PHP7.1后,发现在不使用SSL时可以使用IP发邮件,可设置成SSL时就只能使用hostname发送,PHP提示的错误信息大致意思是说,IP与hostname无法通过SSL验证,修改 ...

  5. postfix发邮件失败,日志和postqueue -p提示No route to host

    1.  防火墙未放行相关端口 2

  6. postfix发邮件失败,日志和postqueue -p提示Connection refused

    1. postfix服务未启动 2. /etc/postfix/main.cf文件中未设置inet_interfaces = all

  7. CentOS 7下MySQL服务启动失败的解决思路

    今天,启动MySQL服务器失败,如下所示: [root@spark01 ~]# /etc/init.d/mysqld start Starting mysqld (via systemctl): Jo ...

  8. thinkphp发邮件失败原因

    使用phpmailer出现连接失败, 代码是别人已经封装好的没有问题,可能原因有如下. qq提示: SMTP server error: mail from address must be same ...

  9. WAMP 环境下,YII创建失败 提示 "'php.exe' 不是内部或外部命..."

    现象: http://www.yiichina.com/guide/quickstart.first-app 使用这里的命令  % YiiRoot/framework/yiic webapp WebR ...

随机推荐

  1. set 集合的知识

    1. 定义: 2. 集合的交集,并集,差集: 3. 集合添加add(无序): 4. 添加可迭代对象(字符串,列表,元组)update: 字符串实例: 5. 删除元素( pop , remove ): ...

  2. hdu1003 Max Sum【最大连续子序列之和】

    题目链接:https://vjudge.net/problem/HDU-1003 题目大意:给出一段序列,求出最大连续子序列之和,以及给出这段子序列的起点和终点. 解题思路:最长连续子序列之和问题其实 ...

  3. SSL/TLS中间人攻击

    准备:kali.xp kali ip:192.168.14.157 目标ip:192.168.14.158 目标网关:192.168.14.2 使用工具:ettercap.sslstrip.arpsp ...

  4. 机器学习数据处理时label错位对未来数据做预测

    这篇文章继上篇机器学习经典模型简单使用及归一化(标准化)影响,通过将测试集label(行)错位,将部分数据作为对未来的预测,观察其效果. 实验方式 以不同方式划分数据集和测试集 使用不同的归一化(标准 ...

  5. springboot mail+Thymeleaf模板

    compile 'org.springframework.boot:spring-boot-starter-thymeleaf' compile 'io.ratpack:ratpack-thymele ...

  6. JS中获取文件点之后的后缀字符

    var FileName = $("#file").val(); var index1=FileName.lastIndexOf("."); var index ...

  7. 深度学习(TensorFlow)环境搭建:(二)Ubuntu16.04+1080Ti显卡驱动

    前几天把刚拿到了2台GPU机器组装好了,也写了篇硬件配置清单的文章——<深度学习(TensorFlow)环境搭建:(一)硬件选购和主机组装>.这两台也在安装Ubuntu 16.04和108 ...

  8. UVA - 1625 Color Length[序列DP 提前计算代价]

    UVA - 1625 Color Length   白书 很明显f[i][j]表示第一个取到i第二个取到j的代价 问题在于代价的计算,并不知道每种颜色的开始和结束   和模拟赛那道环形DP很想,计算这 ...

  9. BZOJ.2160.拉拉队排练(Manacher)

    题目链接 \(Description\) 求给定字符串中 最长的k个回文串长度的乘积(要求回文串长度为奇数):若奇数长度回文串不足k个则输出-1.(len<=10^6,k<=10^12) ...

  10. Python解释数学系列——分位数Quantile

    跳转到我的博客 1. 分位数计算案例与Python代码 案例1 Ex1: Given a data = [6, 47, 49, 15, 42, 41, 7, 39, 43, 40, 36],求Q1, ...