Gmail 邮件缺少标头的问题
我正在尝试以编程方式解析 Gmail 的各种索引功能,但无法找到我认为是标准电子邮件标头的某些标头。我正在使用 Zend IMAP 库,并且在身份验证以及查看/操作我的 Gmail 方面没有任何问题。但是,我遇到了缺少某些标头的问题。例如,
- 大约十分之一的邮件缺少“message-id”标头,其中包括许多
- 偶尔从其他 gmail 地址发送的邮件,尽管很少,但缺少“content-type”、“content-disposition”和“filename”标头附件标题中缺失。这些消息似乎总是属于较长消息线程的一部分。
谁能解释为什么这些标头可能会丢失?如果“message-id”标头丢失,那么使用什么作为唯一标识符?也许是其他标头的某种组合?
I'm trying to programmatically parse my Gmail for various indexing functions, and am having trouble finding certain headers that I thought were standard email headers. I'm using the Zend IMAP library, and have no problems with authentication and otherwise viewing/manipulating my Gmail. However, I'm having trouble with some headers missing. For instance
- about 1 out of 10 of the messages are missing the "message-id" header, including many sent from other gmail addresses
- occasionally, though rarely, the 'content-type','content-disposition', and 'filename' headers are missing from attachment headers. These always seem to be messages that are part of a longer thread of messages.
Can anybody explain why these headers might be missing? If the "message-id" header is missing, what is used as the unique identifier? Perhaps some sort of combination of other headers?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据 RFC 5322:
同一个 RFC 说:
因此严格来说 Message-ID 并不是强制性的。如果丢失,请尝试查找“回复”或“参考”字段。
According to RFC 5322:
The same RFC says:
So Message-ID isn't strictly-speaking mandatory. If it's missing, try looking for either the In-Reply-To or References fields.