# cat /etc/issue
Ubuntu 18.04.6 LTS \n \l
apt install -y msmtp mutt
vim ~/.muttrc
set sendmail="/usr/bin/msmtp"
set use_from=yes
set realname="123456"
set editor="vim"
set from=123456@163.com
set envelope_from=yes
set crypt_use_gpgme=no
vim ~/.msmtprc
account default
host smtp.163.com
user 123456
from 123456@163.com
password 授权码
auth plain
logfile ~/.msmtp.log
echo "hello world" | mutt -s "title" 666666@qq.com
vim ~/.msmtprc
account default
host smtp.163.com
user 123456
from 123456@163.com
password 授权码
auth plain
logfile ~/.msmtp.log
port 465
tls on
tls_starttls off
tls_certcheck off