linux發送郵件mail

1、郵件安裝linux

yum install mailx

 

2、發送郵件的幾種方式shell

    直接shell發送郵件服務器

mail -s "Hello from linuxde.net by shell" chening@sdvte.com
hello,this is the content of mail. 
welcome to www.linuxde.net

    管道發送郵件this

echo "hello,this is the content of mail.welcome to" | mail -s "Hello from linuxde.net by pipe" chening@sdvte.com

    文件發送郵件.net

mail -s "Hello from linuxde.net by file" chening@sdvte.com < mail.txt

 

3、mail服務器配置code

參考【http://irow10.blog.51cto.com/2425361/1812638】blog

相關文章
相關標籤/搜索