找到配置文件/etc/mail.rc添加如下行
# vi /etc/mail.rc
set from=@qq.com
set smtp=smtp.qq.com
set smtp-auth-user=
set smtp-auth-password=sbsbsbsb
set smtp-auth=login
通过以下命令发送邮件
echo hello word | mail -s " title" @qq.com @qq.com
多个邮件地址使用空格分开
2023-07-19 21:16:10
# vi /etc/mail.rc
set from=@qq.com
set smtp=smtp.qq.com
set smtp-auth-user=
set smtp-auth-password=sbsbsbsb
set smtp-auth=login
echo hello word | mail -s " title" @qq.com @qq.com
多个邮件地址使用空格分开