【发布时间】:2019-10-10 12:42:28
【问题描述】:
我想使用 mutt 发送混合的纯文本/html 电子邮件。
下面将不起作用,因为边界 id 未设置(当然)。
mutt -s "mixed body test" me@mydomain.tld < plaintext_html_body.txt
这里是我从我的 Gmail 帐户发送的混合电子邮件的示例。这或多或少是电子邮件源代码的样子。
...
Content-Type: multipart/alternative; boundary=94eb2c088fb8697aed054afba7bf
...
--94eb2c088fb8697aed054afba7bf
Content-Type: text/plain; charset=UTF-8
This is a HTML Test
This is a HTML Test
--94eb2c088fb8697aed054afba7bf
Content-Type: text/html; charset=UTF-8
<div dir="ltr">
<span style="background-color:rgb(0,255,255)">
This is a HTML Test<br>
</span>
<span style="background-color:rgb(69,129,142)">
This is a HTML Test<br>
</span>
</div>
--94eb2c088fb8697aed054afba7bf--
mutt 可以自动生成Content-Type: 标头(包括边界ID)还是有任何机制允许结合纯文本和html 正文?
如果全部崩溃,手动生成整个正文(包括 Content-Type: 标头、边界 ID、两个正文)会起作用吗?
还有其他的想法吗?
【问题讨论】: