转自:https://www.jianshu.com/p/122c43feee90
问题1:
[root@java bin]#/usr/bin/sendemail -o tls=yes -s "smtp.exmail.qq.com:465" -f "发送邮箱" -t "接收邮箱" -xu "发送邮箱" -xp "发送邮箱密码" -u "邮件标题" -m "邮件正文"
返回:ERROR => Timeout while reading from smtp.exmail.qq.com:465 There was no response after 60 seconds.
解决方法:将465换成587,即为/usr/bin/sendemail -o tls=yes -s "smtp.exmail.qq.com:587" -f "发送邮箱" -t "接收邮箱" -xu "发送邮箱" -xp "发送邮箱密码" -u "邮件标题" -m "邮件正文"
问题2:
[root@java bin]#/usr/bin/sendemail -o tls=yes -s "smtp.exmail.qq.com:587" -f "发送邮箱" -t "接收邮箱" -xu "发送邮箱" -xp "发送邮箱密码" -u "邮件标题" -m "邮件正文"
返回:invalid SSL_version specified at /usr/share/perl5/vendor_perl/IO/Socket/SSL.pm line 444.
解决方法:vi /usr/bin/sendemail
第 1906 行,将 'SSLv3 TLSv1' 修改为 'SSLv23:!SSLv2'