如何编写对话中电子邮件分组的代码
...类似于 Gmail!
现在,当主题(几乎)与附加前缀(re:,re:re:,...)相同时,很容易将它们放在一起,
但是您可以在回复等时包含其他人,并且他们确实出现在原来的“对话”线程
我已经有一段时间没有查看标题了,但想知道是否还有额外的 X-??????正在使用的标头或某些 RFC/约定的一部分,
任何已经执行此操作的示例/示例代码当然都很棒!
...similar to gmail !
Now it's easy enough to lump them together when the subject is (almost) same with additional prefixes ( re:, re: re:, ... ) perhaps
but you can include additional people when you reply etc. and they do show up in the original "conversation" thread
i haven't looked at the headers in a while but wondering if there are additional X-?????? headers that're being used or are part of some RFC/convention somewhere
any sample/example code that already does this would be great of course!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
嗯,这完全取决于您如何保存一些数据。
电子邮件标头已为您提供:
它可用于将后续电子邮件链接到对话组中。
Well, it all depends on how you save some of the data.
Email Headers already offer you:
Which can be used to link subsequent emails into a conversation group.
这是一个算法:http://www.jwz.org/doc/threading.html
Here is an algorithm: http://www.jwz.org/doc/threading.html
我确信大多数程序都会将元数据嵌入到消息中,以便在回复返回时可以追溯到原始消息。任何其他的事情都像是猜测,正如你所指出的,只有主题和去/自不会削减它。
例如,Outlook 将线程索引和消息 ID 作为元数据嵌入到消息中,可用于跟踪用户之间的对话,无论稍后是否在对话中添加其他接收者:
Im sure the most programs embedds metadata to the message so it can be tracked back to the original message when a reply is comming back. Anything other would be like guessing and as you point out, only subject and to/from is'nt going to cut it.
Outlook for example embeds thread-Index and Message-ID as metadata in the message wich can be used to track conversations between users no mather if other receivers are added later on in the conversation: