ubuntu 向 OutLook 发邮件

来源:互联网 发布:手机淘宝店铺怎么登陆 编辑:程序博客网 时间:2024/04/30 09:47
背景:Outlook服务器已经存在,outlook的账号sw_test@test.com 和alice@test.com已经存在且可使用

一、安装mutt 和msmtp客户端
$sudo apt-get install muttmsmtp
二、安装的过程中,需要配置msmtp
ubuntu <wbr>向 <wbr>OutLook <wbr>发邮件

ubuntu <wbr>向 <wbr>OutLook <wbr>发邮件

三、配置msmtp 
创建/etc/msmtprc文件,添加以下内容
logfile ~/msmtp.log #log file
#The smtp server of theprovider.
host smtp.test.com
from sw_test@test.com
auth login
user sw_test
password sw_testpasswd
四、配置/etc/Muttrc ,向/etc/Muttrc添加以下内容
setsendmail="/usr/bin/msmtp" 
setuse_from=yes 
setrealname="sw_test" 
setfrom=sw_test@test.com 
setenvelope_from=yes 
seteditor="vim"
总结,不难看出,以上两个配置文件有重复配置的地方
五、测试
echo”hello world” | mutt -s ”title” alice@test.com
登陆alice@test.com的outlook邮箱,可收到由sw_tset@test.com发出的subject为"title",内容为"helloworld"的邮件

0 0
原创粉丝点击