IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    使用mutt发送邮件

    发表于 2017-01-19 10:38:03
    love 0

    首先得把软件包给安装上去
    apt-get install mutt msmtp

    配置msmtp指定邮箱帐号密码
    nano ~/.msmtprc

    account default
    host smtp.163.com
    from xxx@163.com
    auth login
    user xxx@163.com
    password xxxxxx
    logfile ~/msmtp.log

    配置mutt通过msmtp发信
    nano ~/.muttrc

    set sendmail="/usr/bin/msmtp"
    set use_from=yes
    set realname="闲人"
    set from=866134@163.com
    set envelope_from=yes

    set charset="utf-8"
    set send_charset="utf-8"
    set locale = "zh_CN.UTF-8"
    set content_type = "text/html\;charset=utf-8"

    测试发送
    echo "hello world" | mutt -s "邮件标题" test@qq.com

    如果其他问题,查阅~/msmtp.log即可



沪ICP备19023445号-2号
友情链接