email threading in gmail

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

email threading in gmail

Post by s.dot »

Our team is using ActiveCollab software (integrated with Swift Mailer) for collaborations on projects.

Currently, a thread breaks up into a new thread after a reply is made from gmail. Our old project management software did not do this. I have analyzed subject lines and headers extensively but cannot find what makes the threads break up.

Does anyone know what makes gmail break up email threads?

I have also googled extensively and found some references to the in-reply-to and references email headers. We have tried setting these statically to no avail.

So far the only differences between the two project management softwares I can note are

* (obviously, the sender email address and host are different - duh)
* one sends text/plain, the other sends text/html (shouldn't be a difference, we've had threaded html convos before)

I can post more information (headers and subjects) if needed.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: email threading in gmail

Post by Weirdan »

I can post more information (headers and subjects) if needed.
From what I know, threading is usually based on message-id + in-reply-to. Seeing actual headers would be helpful I guess (please be sure to mark where conversation broke).
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Re: email threading in gmail

Post by s.dot »

Well, I was going to post the headers but I'm having a hell of a time getting them. I can get the headers from the inbox of the gmail account, no problem.

It's the incoming mail I'm having a problem getting to before the software parses it.

The ActiveCollab software's email importer must be doing something funky with gmail replies because this is precisely when the threading breaks.

1) Ticket created (or reply made) in web site (using AC software)
2) Reply from GMAIL account
-> if another reply from gmail account is made directly after initial gmail reply, threading remains intact
-> if a reply is made from the web site software, threading breaks up

I have done some tests and reproduced the situation using a reply from my dedicated server and the thread remains intact. This leads me to believe that my server and gmail are sending way different email headers.. OR.. the software is incorrectly parsing the headers from gmail.

Either way I think the only way to know is to fully examine the incoming email headers and how they are being parsed.

(kind of talking myself through this one)
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: email threading in gmail

Post by josh »

Always seemed to me like the subject/body played a big role. Example if I hit reply to a message and backspace the subject, it breaks the thread (I exploit that to find old emails, and write new messages to that person). But that may be just gmail detecting that and changing the message id header?

It does detect which parts of the body are "quoted" and collapses them. So they definitely have the means to tell just from the body alone (although it would make more sense that they use the message id with the volume of mail that they must deal with)
stuartshields
Forum Newbie
Posts: 10
Joined: Sat Jan 30, 2010 8:59 pm
Location: Toowoomba

Re: email threading in gmail

Post by stuartshields »

I agree with josh on this one, also I think it has something to do with re: within a reply. If you need another real world example you'll notice Thunderbird 3.0 has this same feature (although you do need to make it active).
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Re: email threading in gmail

Post by s.dot »

It did have to do with the in-reply-to header. I had to capture the message id gmail was sending, and then when that particular ticket was replied to from within the software i had to look up that message id and send the in-reply-to header with the value being that message id

made it work :)
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: email threading in gmail

Post by josh »

I have a contact form on my website. It sends emails with the regular mail() function, but with the same subject everytime.

Gmail annoyingly groups them by their subject even tho they are all "freshly composed". Just thought I'd share :D
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: email threading in gmail

Post by Eran »

you can add the date + time to the subject to avoid that
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: email threading in gmail

Post by josh »

Thanks for the tip. A salt of the user's email address would be even better!
Post Reply