1、首先要安装maix,默认已经安装。

2、配置/etc/mail.rc


   

set from=weisheng@qyr.com

set smtp=mail.qyr.com

set smtp-auth-user=weisheng@qyr.com

set smtp-auth-password=密码

set smtp-auth=login



3、echo “mail content”|mail -s test weisheng@qye.com