首页 > 系统相关 >Centos7使用sendEmail-v1.56发送邮件

Centos7使用sendEmail-v1.56发送邮件

时间:2022-10-10 01:00:07浏览次数:78  
标签:v1.56 sendEmail perl Centos7 SSL usr com 邮件

Centos7使用sendEmail-v1.56发送邮件
注意:Centos7默认使用perl5.16,而sendEmail-v.1.56要求使用perl5.10。否则会报以下错误。所以需要下载并安装Perl-5.10


Using the default of SSL_verify_mode of SSL_VERIFY_NONE for client
is deprecated! Please set SSL_verify_mode to SSL_VERIFY_PEER
possibly 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/local/bin/sendEmail line 190****6.
invalid SSL_version specified at /usr/share/perl5/vendor_perl/IO/Socket/SSL.pm line 444

1.安装Perl-5.10

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.10.0
./configure.gnu -des -Dprefix=/usr/local/perl
echo $? #返回0,编译没问题
make
make test
make install
备份原来的Perl
mv /usr/bin/perl /usr/bin/perl.bak
ln -s /usr/local/perl/bin/perl /usr/bin/perl
查看Perl版本,显示5.10表示已经成功
perl -v

2.安装sendEmail
wget http://caspian.dotconf.net/menu/Software/SendEmail/sendEmail-v1.56.tar.gz
tar -xzvf sendEmail-v1.56.tar.gz /
mv sendEmail /usr/local/bin/

3.邮件使用测试
sendEmail -f [email protected] -s smtp.163.com -u "Linux sendMail" -o message-content-type=html -o message-charset=utf-8 -xu [email protected] -xp 'xfgzincrvghqbbdf' -t [email protected] -m "Hello World"

结果显示:Email was sent successfully!

注意:-m选项无法发送多条文本时,可通过附件发送多文本内容或
通过-o 把文件的内容当作正文部分。
-o message-file=/users/robin/addmrpt_1_11584_11649.txt

参数说明:
-f [email protected] 发件人邮箱
-s smtp.163.com 发件人邮箱的smtp服务器
-u "我是邮件主题" 邮件的标题
-o message-content-type=html 邮件内容的格式,html表示它是html格式
-o message-charset=utf8 邮件内容编码
-xu [email protected] 发件人邮箱的用户名
-xp ‘授权码’ 发件人邮箱授权码
-m "我是邮件内容" 邮件的具体内容

标签:v1.56,sendEmail,perl,Centos7,SSL,usr,com,邮件
From: https://www.cnblogs.com/tang-learning/p/16774252.html

相关文章

  • 等保centos7密码策略
    [root@iZwz9ayhnug196k9jk1iukZyunwei]#cat/etc/pam.d/system-auth#%PAM-1.0#Thisfileisauto-generated.#Userchangeswillbedestroyedthenexttimeaut......
  • centos7 sqlite-安装升级编译安装
    centos7sqlite-安装升级编译安装升级-编译安装wgethttps://www.sqlite.org/2019/sqlite-autoconf-3290000.tar.gztarzxvfsqlite-autoconf-3290000.tar.gzcdsqlit......
  • centos7 编译cpp报错 /usr/include/c++/4.8.2/iostream:38:28: 致命错误:bits/c++confi
    解决方法:升级gcc编译器 Centos7升级gcc安装centos-release-scl安装devtoolset 注意,如果想安装7.版本的,就改成devtoolset-7-gcc,以此类推sudoyuminstallcentos-re......
  • centos7.x重置系统密码
      centos7单用户模式更改计算机密码重启——在第一行按e——找到linux16的一行,在最后面加上rd.break(如果是虚拟机还需要加上console=tty0)——ctrl+x重......
  • CentOS7安装.netCore
    CentOS7安装.NET之前,请运行以下命令,将Microsoft包签名密钥添加到受信任密钥列表,并添加Microsoft包存储库。打开终端并运行以下命令:sudorpm-Uvhhttps://packa......
  • CentOS7升级系统内核到4.19
    由于在线升级会升到最新版本,所有采用下载离线rpm包方式进行升级到指定版本第一步:下载离线升级包wgethttp://mirrors.coreix.net/elrepo-archive-archive/kernel/el7/x86......
  • CentOS7安全检查
    #!/bin/bash##Filename:CentOS_Check_Script.sh##Date:2019-03-01#Update:2022-07-14#Author:jhl##Description:Securitydetections......
  • Centos7部署pptp
    方法一查看参考文章即可。方法二安装pptp和pppyuminstallppppptpd-y如果安装不了,换yum源下载阿里云或者网易镜像cd/etc/yum.repos.dmvCentOS-Base.repoCe......
  • Centos7_docker509错误
    CentOS7Dockerx509:certificatesignedbyunknownauthority解决方案registry-1.docker.io/v2/1.echo-n|openssls_client-showcerts-connectregistry-1.doc......
  • CentOS7环境源码安装freeswitch1.10
    操作系统:CentOS7.6_x64   freeswitch版本:1.10.7一、安装步骤1、下载freeswitch源代码wgethttp://files.freeswitch.org/releases/freeswitch/freeswitch-1.1......