Thread letters by subject

We are sorting a mailbox signed into a mailing list (Mailman), which does nothing but sit and write down emails from other users on the mailing list. This will be the PHP associated with the mailbox, capturing new emails and placing them in a MySQL database for use as a web archive that can be found using search.

I noticed that many of the subjects had RE: FW: FWD in front of them (obviously), but they wondered if I need to manually separate them to get a grouping by topic when displaying the database results on the Internet p.

Perhaps there is a PHP / Mail or PEAR class that will automatically handle grouping / message flows that I don't know about. Thank you for your help!

+3
source share
2 answers

The correct way to cut them is not by topic, but by Message-IDand References. The header Referenceswill contain a comma delimited string from all previously associated headers Messgage-ID. Using them, the actual content of the subject line becomes less relevant, since it can be changed and distorted. In other cases, you can get many separate threads with topics such as Need Help, which should not be related to each other.

+5
source

You probably want to examine the message headers Referencesand In-Reply-To. They give you information about which e-mail the current letter is sent to.

: http://www.jwz.org/doc/threading.html

+1

All Articles