Centos7发送邮件

Centos7发送邮件

$ yum -y install mailx sendmail

$ vim /etc/mail.rc
set from=xxxxxx@163.com 
set smtp=smtp.163.com
set smtp-auth-user=wwwcqscom@163.com
set smtp-auth-password=123456
set smtp-auth=login


$ systemctl start sendmail


$ touch content.txt
$ vim content.txt
#邮件内容
XXXXXXXXXXXXX
XXXXXXXXXXXXX

$ mail -s 'Test Mail' 123456789@qq.com < content.txt

 

posted on 2018-01-08 17:51  AF陈  阅读(153)  评论(0编辑  收藏  举报

导航