[关闭]
@xtccc 2017-04-21T06:40:32.000000Z 字数 599 阅读 1512

发送邮件

给我写信
GitHub

此处输入图片的描述


Linux


参考:


1. sendmail命令


参考 Send a multipart/alternative email with sendmail

一个典型的例子。

保存以下文本在文件test.dat中。

  1. From: "GridX Operations Center" <$sender>
  2. To: "Tao Xiao" <tao@qq.com>
  3. Subject: Welcome onboard, Tao!
  4. MIME-Version: 1.0
  5. Content-Type: multipart/mixed; boundary="xxyyzz"
  6. This message is in MIME format. But if you can see this,
  7. you aren't using a MIME aware mail program. You shouldn't
  8. have too many problems because this message is entirely in
  9. ASCII and is designed to be somewhat readable with old
  10. mail software.
  11. --xxyyzz
  12. Content-Type: text/html; charset=utf-8
  13. <html>
  14. ...
  15. ...
  16. </html>
  17. --xxyyzz

通过执行命令即可发送邮件:

  1. $ cat test.dat | sendmail -t
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注