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