System.Net.Mail.MailMessage 和 Microsoft SMTP 服务器使用的 EML 文件格式

发布于 2024-08-22 15:44:25 字数 451 浏览 1 评论 0原文

我正在尝试了解由 System.Net.Mail.MailMessage 生成并由 Microsoft 的 SMTP 服务器生成或使用的 EML 文件。我一直在阅读 RFC 5322 和 5321,并试图理解该格式。

诚然,我看到的大多数 EML 文件都遵循 5322(或 2322 或 822,但我不知道好的 MS 是否遵守标准)中描述的消息格式。但是,我无法完全确定文件的顶部部分(X-Sender 和 X-Receiver 行)是否构成 5321 所描述的“信封”。

我想我的问题是:

  1. 是否有这部分的文档包含 X-Sender/X-Receiver 行的文件(消息内容上方)?
  2. 本节中是否还有其他“命令”?
  3. 这是一个全面的“标准”吗?即我可以期望由 System.Net.Mail.MailMessage 生成的 EML 文件在任何标准 SMTP 服务器中都能正确解析吗?

I'm trying to wrap my head around the EML files I see generated by System.Net.Mail.MailMessage and generated or consumed by Microsoft's SMTP Server. I've been reading RFCs 5322 and 5321 and I'm trying to make sense of the format.

Granted, the majority of the EML files I see are adherent to the message format described in 5322 (or 2322 or 822, however good MS stuck to the standards, I don't know). However, I can't quite decide if the top portion of the file (the X-Sender and X-Receiver lines) constitute the "envelope" as described by 5321.

I guess my questions are:

  1. Is there documentation for the portion of this file with X-Sender/X-Receiver lines (above the message contents)?
  2. Are there other "commands" that can be expected in this section?
  3. Is this a "standard" across the board? i.e. can I expect an EML file that is generated by System.Net.Mail.MailMessage to be parsed correctly in any standard SMTP server?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

仄言 2024-08-29 15:44:25

不,没有任何文档。这仅由 IIS SMTP 服务完成,据我所知,没有任何其他命令。

但是,电子邮件仍然符合 RFC2822。它只是在消息前面添加一些仍符合 RFC 标准但被 IIS SMTP 服务识别的 X 标头。

IIS SMTP 服务将使用 X-Sender 值作为 SMTP MAIL FROM 值,使用 X-Receiver 作为 RCPT TO 值。

No, there isn't any documentation. This is something only done by the IIS SMTP service, and there aren't any other commands that I'm aware of.

However, the email is still RFC2822 compliant. It just prepends the message with some X-Headers that are still RFC compliant, but are recognized the IIS SMTP service.

The IIS SMTP service will use the X-Sender value as the SMTP MAIL FROM value, and the X-Receiver as the RCPT TO value.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文