Linux系统--CentOS 7.6.1810 配置QQ邮箱

1、安装mailx

yum install mailx -y

2、编辑配置文件

vim /etc/mail.rc

set [email protected]
set smtp=smtp.qq.com
set [email protected]
set smtp-auth-password=QQ授权码
set smtp-auth=login

3、测试邮件

echo test |mailx -v -s "test" [email protected]

常用命令(邮件命令提示符中常用命令)
h: 查看邮件标题。
d: 使用该命令加序号可以删除指定的邮件。
f: 查看当前光标指向的邮件。
n: 跳转到指定序号的邮件。
w: 保存邮件信息到文件,保存附件到单独的文件。
q: 退出并将已阅读的邮件存入文件~/mbox中。
x: 退出不保持之前的操作,如删除邮件等。
!: 允许使用shell命令。

猜你喜欢

转载自www.cnblogs.com/shuter/p/11238980.html