linux發送郵件方法

操作系統:centos6.5

需要軟件:postfix  默認安裝有 如果沒有 yum install postfix即可

                mutt   yum install mutt

安裝後編輯

vi /etc/muttrc

defaults
account soomeng
host smtp.126.com
from [email protected]
auth login
port 25
tls off
user [email protected]
password yourpasswd
account default : biaoti


#如果你收到的郵件亂碼,設置以下信息

set charset="utf-8"

set rfc2047_parameters=yes

#如果你想自定義發件人信息,需要進行如下設置

set envelope_from=yes

set use_from=yes

set [email protected]

set realname="licz"  


cat /root/install.log | mutt -s "test' [email protected]


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