天天看點

Linux下通過指令行mail發送e-mail

找到配置檔案/etc/mail.rc添加如下行

# vi /etc/mail.rc  
set [email protected]
set smtp=smtp.qq.com  
set smtp-auth-user=123456
set smtp-auth-password=sbsbsbsb
set smtp-auth=login      

通過以下指令發送郵件

echo  hello word | mail -s " title" [email protected] [email protected]      

多個郵件位址使用空格分開