1.安裝mail了mutt
yum -y install mailx
yum -y install mutt
2.修改/etc/mail.rc
在末尾添加以下信息:
set [email protected]#可以不寫
set smtp=smtp.joyveb.com
set smtp-auth=login
set smtp-auth-user=user
set smtp-auth-password=password
- 測試:
echo "test1234" | mail -s "test" [email protected]