安装mailx:

yum install mailx

 

vi /etc/mail.rc

set from=524755798@qq.com
set smtp="smtps://smtp.qq.com:465"
set smtp-auth-user=524755798
set smtp-auth-password=xxxxxxx (邮箱账号的客户端授权码,需要登陆自己的邮箱进行设置,不是邮箱密码)
set smtp-auth=login
set ssl-verify=ignore
set nss-config-dir=/etc/pki/nssdb

 

测试:

echo test | mailx -v -s "test"  test@126.com

相关文章:

  • 2021-12-16
  • 2021-04-11
  • 2022-02-22
  • 2022-12-23
  • 2022-02-09
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-05
  • 2021-06-26
  • 2022-12-23
  • 2022-12-23
  • 2021-05-20
  • 2021-04-16
  • 2021-12-06
相关资源
相似解决方案