ubuntu 向 OutLook 發郵件

背景:Outlook服務器已經存在,outlook的賬號[email protected][email protected]已經存在且可使用

一、安裝mutt 和msmtp客戶端
$sudo apt-get install mutt msmtp
二、安裝的過程中,需要配置msmtp
ubuntu <wbr>向 <wbr>OutLook <wbr>發郵件

ubuntu <wbr>向 <wbr>OutLook <wbr>發郵件

三、配置msmtp 
創建/etc/msmtprc文件,添加以下內容
logfile ~/msmtp.log #log file
#The smtp server of the provider.
host smtp.test.com
auth login
user sw_test
password sw_testpasswd
四、配置/etc/Muttrc ,向/etc/Muttrc 添加以下內容
set sendmail="/usr/bin/msmtp" 
set use_from=yes 
set realname="sw_test" 
set envelope_from=yes 
set editor="vim"
總結,不難看出,以上兩個配置文件有重複配置的地方
五、測試
echo ”hello world” | mutt -s ”title” [email protected]
登陸[email protected]的outlook郵箱,可收到由[email protected]發出的subject爲"title",內容爲"hello world"的郵件

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