使用linux系統給郵箱發郵件

配置文件如下:

[root@localhost ~]# vim /etc/mail.rc


set [email protected] smtp=smtp.163.com

set [email protected]  smtp-auth-password=密碼

set smtp-auth=login



在所用郵箱開啓smtp協議

wKioL1gd4Irzot8_AABIJbF77dw894.jpg


測試

[root@localhost ~]# echo "hello" | mail -s "hello test" [email protected]


wKiom1gd4PuhJAW2AAAGDolpCa0406.jpg

郵箱收到郵件





PS:

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"   [email protected] &> /dev/null  ; done


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章