Вопрос

I want to tie email "threads" together programmatically, specifically gmail and yahoo email "conversations." Is there a way to do this (some kind of link or pointer or "thread ID" contained within an email), or am I stuck with relying on the emailers not changing the text in the "Subject" line?

And besides, that trick would be barely functional at all, as many unrelated threads may have the same subject (such as "[no subject]" etc.).

Это было полезно?

Решение

Yes. EMails contain a header (message ID), that is a unique identifier for that email. It conveys no meaning itself, but another header (in-reply-to) that refers to the message Id of the email it is in reply to. almost every email client does a passable job with these and is used by many to provide the threading you refer to.

In addition, you can use the subject plus relative times to allow relative ordering.

Wikipedia has a great article that discusses these, and links you off to the relevant RFCs: http://en.wikipedia.org/wiki/Email#Message_format

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top