mutt + msmtp 在ubuntu使用163邮箱收发邮件

前提:登录163邮箱,在设置中获取客户端授权码

 

1. 安装软件

sudo apt-get install msmtp

sudo apt-get install mutt

2. 配置msmtp

touch ~/.msmtplog

vi ~/.msmtprc

account default
host smtp.163.com
user xxx
from xxx@163.com
password 网易邮箱客户端授权码
auth login
tls off
logfile ~/.msmtp.log

chmod 600 ~/.msmtprc

 测试:msmtp --host=smtp.163.com --serverinfo

3.配置mutt

 cp /etc/Muttrc ~/.muttrc

set sendmail="/usr/bin/msmtp"
set use_from=yes
set realname="xxxxx"
set from=xxx@163.com
set envelope_from=yes

测试: echo "hello world" | mutt -s "title" xxx@qq.com 或使用 mutt交互式命令发送邮件

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值