mail

1
2
# 安装邮件服务
yum -y install mailx
1
2
3
4
5
# 配置/etc/mail.rc
set from=ljkk3014@foxmail.com
set smtp=smtp.qq.com
set smtp-auth-user=ljkk3014@foxmail.com
set smtp-auth-password=jwopcmnpmawddbbg # 随便写的
1
2
# 发送邮件
[root@centos8 ~]# echo -e "Hello, I am `whoami`,The system version is here,please help me to check it ,thanks! \n`cat /etc/os-release`" | mail -s hello 441757636@qq.com

效果: