【问题标题】:Sending mail Body and attachment using mailx - Linux使用 mailx 发送邮件正文和附件 - Linux
【发布时间】:2020-06-02 09:51:20
【问题描述】:

ma​​ilx -a 'Content-Type: text/html' -s "Body"

我正在尝试使用 mailx 命令行发送电子邮件。上述命令可以正常发送正文为 html 文件。
但伴随着它我也想发送一个附件。 是否可以将附件和正文作为文件一起发送? 怎么做

【问题讨论】:

    标签: linux ubuntu sendmail mutt mailx


    【解决方案1】:

    我找到了使用 mutt 的解决方案 这是命令

    mutt -e "set content_type=text/html" -s "你的主题" to@domain.com -a attachfile.txt

    index.html 此文件中的内容将打印在邮件正文中 -a 你可以附加任意数量的附件

    【讨论】:

      猜你喜欢
      • 2016-08-16
      • 1970-01-01
      • 1970-01-01
      • 2012-01-09
      • 2014-08-09
      • 1970-01-01
      • 2014-10-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多