@xtccc
2017-04-21T14:40:32.000000Z
字数 599
阅读 1626
Linux
参考:
参考 Send a multipart/alternative email with sendmail
一个典型的例子。
保存以下文本在文件test.dat中。
From: "GridX Operations Center" <$sender>
To: "Tao Xiao" <tao@qq.com>
Subject: Welcome onboard, Tao!
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="xxyyzz"
This message is in MIME format. But if you can see this,
you aren't using a MIME aware mail program. You shouldn't
have too many problems because this message is entirely in
ASCII and is designed to be somewhat readable with old
mail software.
--xxyyzz
Content-Type: text/html; charset=utf-8
<html>
...
...
</html>
--xxyyzz
通过执行命令即可发送邮件:
$ cat test.dat | sendmail -t