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wSremkrj/xw0llmozFyD4lt5SZu5IycQfwhl7t
UCemDaYj+bvLpgcUQg==
-----END CERTIFICATE-----
touch /usr/local/msmtp/msmtp.log
vi ~/.msmtprc
~/.msmtprc 为用户配置文件
/usr/local/msmtp/etc/msmtprc 为全局配置文件
account default
host smtp.gmail.com
port 587
from
tls on
tls_starttls on
tls_trust_file /usr/local/msmtp/certs/Thawte_Premium_Server_CA.pem
auth on
user lantu.get
password 123123qwe
logfile /usr/local/msmtp/msmtp.log
测试msmtp
/usr/local/msmtp/bin/msmtp
输入邮件内容
ctrl+d结束
查看/usr/local/msmtp/msmtp.log是否发送成功 然后登陆邮箱查看是否收到邮件
~/.muttrc 为用户配置文件
/usr/local/mutt/etc/Muttrc 为全局配置文件
set sendmail="/usr/local/msmtp/bin/msmtp"
set realname="发件人名称(非邮箱登录名)"
set use_from=yes
set editor="vi"
测试mutt+msmtp
echo "邮件内容" | /usr/local/mutt/bin/mutt -s "邮件主题" -c
命令解释:
发送内容为 "邮件内容" 标题为 "邮件主题" 的邮件到 同时抄送
阅读(4554) | 评论(0) | 转发(0) |