配置文件以下:vim
[root@localhost ~]# vim /etc/mail.rcide
set from=zebra9301@163.com smtp=smtp.163.com测试
set smtp-auth-user=zebra9301@163.com smtp-auth-password=密码blog
set smtp-auth=loginget
在所用邮箱开启smtp协议input
测试it
[root@localhost ~]# echo "hello" | mail -s "hello test" zebra9301@163.comio
邮箱收到邮件class
PS:test
read -p 'Please input QQ' QQ
read -p 'Please input the mail-number' n
for i in `seq $n ` ; do echo ‘hello $i ’ | mail -s "hello $i" $QQ@qq.com &> /dev/null ; done