1、在用户家目录,编辑.mailrc文件,添加如下内容:

set from=29308620@qq.com       #qq邮箱地址
set smtp=smtp.qq.com
set smtp-auth-user=29308620@qq.com
set smtp-auth-password=esvnhbnqocirbicf    #qq邮箱授权码
set smtp-auth=login
set ssl-verify=ignore

 

2、然后在shell终端使用如下命令:

[root@x112 ~]# echo you are the best one|mail -s "Congratulations" feng_xp@xxxx.com

 

3、登陆邮箱测试查看:

Linux系统使用qq邮箱在线发送邮件

 

相关文章: