特价香港大宽带
特价活动
携手合作伙伴,实现业务上的双向合作共赢
我们为您提供全方位的支持与服务,确保您在使用我们的云服务时无忧无虑。
10+年商誉沉淀,深耕中国香港及海外高端资源
1、关闭本机的sendmail服务或者postfix服务
#执行下面的命令,各位大侠都对号入座吧
#sendmial
service sendmail stop
chkconfig sendmail off
#postfix
service postfix stop
chkconfig postfix off
#再狠一点就直接卸载吧..
yum remove sendmail
yum remove postfix
2、然后修改/etc/mail.rc,在文件末尾增加以下内容,指定邮箱和授权码
set from=123456@qq.com
set smtp=smtp.qq.com
set smtp-auth-user=123456
set smtp-auth-password=你的授权码
set smtp-auth=login
4、然后通过命令来发送邮件
echo hello word | mail -s " title" 123456@qq.com
如果希望带html格式的内容,可以这么发:
echo "
" | mail -s "$(echo -e "This is the subject\nContent-Type: text/html")" 123456@qq.com
参考文献: