gpt4 book ai didi

php - 多部分/混合电子邮件。附带空体。怎么了?

转载 作者:行者123 更新时间:2023-12-04 05:13:38 25 4
gpt4 key购买 nike

发送邮件:

From: <...>
X-Mailer: SnowBoss
Reply-To: <...>
X-Priority: 3 (Normal)
Message-ID: <248.20091210135259@snowman2010.com>
To: <...>
Subject: =?UTF-8?B?0JzQntCZIFNVQkpFQ1Q=?=
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----------A4D921C2D10D7DB"

This is a multi-part message in MIME format.

----------A4D921C2D10D7DB
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

MY TEXT
----------A4D921C2D10D7DB
Content-Type: text/html;
charset=utf-8
Content-Transfer-Encoding: 8bit

<html><b>BOLD</b></html>
----------A4D921C2D10D7DB
.

<250 Data received OK. //server response

它带有空体。这只发生在 multipart/mixed 内容(尝试过 multipart/alternative - 相同的故事)

最佳答案

正如 Tomasz 所提到的,在您使用边界的行中,边界分隔符的开头必须有两个连字符。检查以下内容:

MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="frontier"

This is a message with multiple parts in MIME format.
--frontier
Content-Type: text/plain

This is the body of the message.
--frontier
Content-Type: application/octet-stream
Content-Transfer-Encoding: base64

PGh0bWw+CiAgPGhlYWQ+CiAgPC9oZWFkPgogIDxib2R5PgogICAgPHA+VGhpcyBpcyB0aGUg
Ym9keSBvZiB0aGUgbWVzc2FnZS48L3A+CiAgPC9ib2R5Pgo8L2h0bWw+Cg==
--frontier--

另请注意,在最后一个边界处,您必须再放置两个连字符以表示结束。

示例取自维基百科,参见 here .

关于php - 多部分/混合电子邮件。附带空体。怎么了?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1880249/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com