标签:linux
默认的mail不能对外发邮件,修改/etc/mail.rc,增加以下内容:
set from=report3@163.com
set smtp=smtp.163.com
set smtp-auth-user=report3
set smtp-auth-password=password
set smtp-auth=login
测试:
echo "mailbody" | mail -s "subject" abc@qq.com
mail -s "mail subject" abc@qq.com < yourbody.txt
检查abc@qq.com有无收到邮件
标签:linux
原文地址:http://xiaosa.blog.51cto.com/665033/1589602